How to ORDER BY a field consisting of digits following by alphabets in MySQL? -
how order field consisting of digits following alphabets, such 10s
, in mysql? desired order is:
- digits, e.g.,
10
- digits+alphabets, e.g.,
10s
for instance,
# original data: 1 10 105 109 10s # desired results 1 10 10s 105 109
try this:
select values table order cast(values unsigned), values;
Comments
Post a Comment