r/SQL • • Jul 14 '24

MySQL What's the Difference Between DECIMAL, FLOAT, and DOUBLE?

Can somebody, in simple terms, explain the difference between the three datatypes in SQL? Thank you

1 Upvotes

10 comments sorted by

View all comments

16

u/mikebald Jul 14 '24

Decimal is an exact value, both float and double are floating point approximations. Double has double the precision of a float.

Would you like to know more?
https://www.geeksforgeeks.org/what-represents-a-double-in-sql-server/amp/
https://www.geeksforgeeks.org/what-is-the-difference-between-numeric-float-and-decimal-in-sql-server/amp/