table: data
column: service_number, type: varchar(11);
select * from data;
service_number
19-1
19-2
20-1
20-10
20-11
20-12
...
20-19
20-2
20-20
20-21
20-22
20-23
20-24
20-3
20-4
20-5
...
20-9
select * from data order by service_number;
select * from data order by service_number *1;
service_number
19-2
19-1
20-9
20-8
20-7
20-6
20-5
20-4
20-3
20-24
20-23
20-22
20-21
20-20
20-2
20-19
20-18
20-17
...
20-10
20-1
The result I want is the same.
19-1
19-2
20-1
20-2
20-3
20-4
20-5
...
20-9
20-10
20-11
20-12
20-13
...
20-19
20-20
20-21
20-22
20-23
20-24
As a result of searching the internet, it was said that if you want to sort by recognizing a string as a number, you can put *1 after the'order by field', but as shown above, it is displayed strangely. I think there is a problem with the (-, dash) symbol, how do I fix it?