1

I need to sort my MySQL column (type - varchar) so that a character (like 'A') has less weight-age than a number (like '1') . so that when I sort , my result should look like this -

AAAA 
AAA1  
AA1A  
B  
...  
...  
ZZZZ 
ZZZ1 
0000 
.... 
9999

right now it starts with 0000 and goes up to ZZZZ.

Shabad Jot
  • 11
  • 1
  • Using the first answer in the linked question, you would describe it as `ORDER BY the_column REGEXP '^[a-z]' ASC, the_column ASC` to sort the letters first, and then alphabetically/numerically within. – Michael Berkowski Sep 23 '14 at 20:18

0 Answers0