r/SQL • u/tvtacolb • Apr 02 '26
MySQL MYSQL Question Help
I'm having an issue understanding what the right answer is.
The question is
Which data type will store "287,33" as a numeric value without loss of information?
- BIT
- INT
- DECIMAL
- VARCHAR
The quotes and the comma are throwing me off, thinking it's VARCHAR
1
Upvotes
View all comments
Show parent comment
1
u/Ginger-Dumpling Apr 02 '26
Probably.
If it were "28,733" one might be able to argue it's an integer so both integer and decimal would be sufficient to store it without loosing anything.
But it being "287,33" means it's probably a country that uses a comma as a decimal separator, and then leaves you with only one right answer.