Vote count:
0
Current SQL: SELECT code FROM myTable ORDER BY code ASC
code---111131213A
This is the current order I have of a MySQL table.
I want the order to be A-Z, 1-10 however, numerically, like this:
code---111213A113
The reason this is not possible in the first place is because the code column is varchar and not int. However as shown in the example, some codes have a letter prepended to them so I cannot change this to integer.
How can I get around this problem without changing the data type?
asked 1 min ago
Order a VARCHAR column numerically
Aucun commentaire:
Enregistrer un commentaire