I have a query ordered by column:
select * from mytable order by column asc — sort table
column type is varchar,
You can use this if you want to treat column as INT only:
SELECT * FROM mytable ORDER BY column+0;
1
10
11
12
13
100
Or this if you want to treat column as both INT and VARCHAR
SELECT * FROM mytable ORDER BY column+0, column; #this will sort the column by VARCHAR first and then sort it by INT
abc
xyz
1
10
11
12
13
100