How To Sort Text as a Number in MySQL

Published Date Author: , Posted July 11th, 2013 at 12:47:43pm

select theField from theTable order by theField+0;

~OR~

select theField from theTable order by CAST(theField AS UNSIGNED);

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.