I have a table example:
id -- score
1 -- 5.66678
2 -- 11.598
3 -- 12.2
4 -- 11.598
5 -- 2.577777
score is set as a VARCHAR currently.
id is an integer
My simple MySQL query:
SELECT *
FROM `mysql_table`
ORDER BY CONVERT( score, DECIMAL ) DESC
For some reason it pulls it something similar to this:
id -- score
2 -- 11.598
3 -- 12.2
4 -- 11.598
1 -- 5.66678
5 -- 2.577777
12.2 is stuck between the two 11.598’s. Is there a reason for this? Am I doing something wrong?