mySQL CAST and ASC / DESC
问题 I have a mysql_query SELECT * FROM table ORDER BY CAST(row AS DECIMAL) and want to change the sort direction. I tried ASC and DESC but both return exactly the same sort direction. How do I resort it? Thanks, greets Julian 回答1: That should work. Have you tried to display that, what your CAST(row AS DECIMAL) produces? Paste example of data that you trying to sort. Maybe you have nulls there or numbers that cant fit into decimal type. What version of mysql you are using? Maybe reason is this