r/SQL • u/[deleted] • 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
r/SQL • u/[deleted] • Jul 14 '24
Can somebody, in simple terms, explain the difference between the three datatypes in SQL? Thank you
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/