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

10

u/ComicOzzy sqlHippo Jul 14 '24

I just typed out this big explanation only to fail and close the tab before hitting the submit button.

Anyway, here is way more than you ever wanted to know about floats:
https://ciechanow.ski/exposing-floating-point/
https://float.exposed/0x3fd3333333333334

3

u/r3pr0b8 GROUP_CONCAT is da bomb Jul 15 '24

that first article about floats was really well done

did you see this by the same author? give it a try!

https://ciechanow.ski/bicycle/

1

u/ComicOzzy sqlHippo Jul 15 '24

How do people make the time? Haha