how to order by ‘0057’,’0058′, ‘1’, ‘2’, ‘3’, ‘A1’, ‘A2’, ‘A3’ in sql
Can anyone plese give idea to diplay the section data (alpha numeric column) in this below order?
Actual
0057
0058
10
11
5
6
A5
A6
Expected
0057
0058
5
6
10
11
A5
A6
I tried this statement
a.section REGEXP '^-?[0-9]+$' DESC, length(a.section + 0), a.section this response is like this 1, 2, 0057, 0058, 10, 12, A1, A2.
but we expect output like this 0057, 0058,1, 2, 10, 12, A1, A2
2
Answers
You say:
If that’s the case, you can do: