select myid from mytable where myid rlike '^[A-Z].*' order by myid; select myid from mytable where myid rlike '^[0-9].*' order by abs(myid);