Můžete zkusit toto: SELECT id,name,ip,CONVERT(SUBSTRING(name FROM 4),UNSIGNED INTEGER) num ORDER BY num;