Sorting varchar field numerically in MySQL

Try this

SELECT * FROM table_name ORDER BY CAST(field_name as SIGNED INTEGER) ASC

Leave a Comment