Sometime when using SQL to order some data it doesn’t sort correctly. Heres is one super simple trick to naturally order in these cases.
For example given the following post numbers:
# Using normal ORDER BY SELECT number FROM posts ORDER BY number ASC #==> [1A,10A,2A,20A] Wrong!!! SELECT number FROM posts ORDER BY number + 0 ASC #==> [1A,2A,10A,20A] Correct Answer!
Related External Links: