Answer the question
In order to leave comments, you need to log in
Sorting a textbox as a number and as a string at the same time?
Hello! I'm displaying data from a table in a GridView. There is a field "Number" - text type. Can you please tell me how to sort this field in the Mysql database at the same time as a number and a string. For example:
1, 2, Field, Number, 10, 15
And get after sorting
1, 2, 10, 15, Number, Field
Answer the question
In order to leave comments, you need to log in
There is no natural sort in SQL, only two options ASC / DESC
SELECT * FROM table ORDER BY value ASC
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question