MySQL no numbers varchar sorting not working

26 Views Asked by At

My attendee_lastname column definition: enter image description here My sql:

SELECT attendee_lastname FROM oc_attendee ORDER BY attendee_lastname ASC

My Result:

enter image description here

I would expect lastname Abraham to be first? Any ideas?

1

There are 1 best solutions below

0
Quentinb On

I found that the User typed in a space before their last_name. This resulted in all those starting with spaces to be first on the list and then the rest. After removing all spaces it works perfectly.