Let say I have a user
table and the record is like this:
----------------------
| User ID | Username |
----------------------
|US1 | Andy |
|US2 | Boston |
|US3 | Charlie |
|US4 | Donnie |
|US5 | Elmo |
|US6 | Frank |
|US7 | Garry |
|US8 | Henry |
|US9 | Ignatius |
|US10 | John |
What I need is
US10 | John
Then I do:
SELECT MAX (UserId) FROM User;
The result was
US9 | Ignatius
because its ordered by string literally, so US10 is not the max
What should I do to accomplished that result? Thanks in advance.