I have a column named MR which is a varchar. When I run a query with an ORDER BY it doesn’t seem to be ordered correctly.
select MR, LName, FName from users
where MR between 'MR20001' and 'MR20002'
order by MR
Results:
MR20001 | LINA | MARY
MR200011 | TEST | CASE
MR20002 | KO | MIKE
Why does MR200011 show before MR20002?
Try casting it,