For example:
SELECT * FROM atable ORDER BY num;
‘atable’ is:
num name
1 a
3 y
0 cc
2 fs
The result is:
num name
1 a
2 fs
3 y
0 cc
But I want it to be:
num name
0 cc
1 a
2 fs
3 y
I can’t reproduce the result you are seeing. The query that you posted should work as you wish it to. Here’s my steps to reproduce:
Result:
Perhaps you could post your create scripts for your table and test data in your question so that we can reproduce your result?