SQLite Forum

Natural sort order
Login
The two functions above might return surprising results for 
integers with leading zeros.

~~~~
    SELECT 'x123y' < 'x00005y' COLLATE natsort;
~~~~

The above returns true.  Should it?  Or should the answer be false?
What should this return:

~~~~
    SELECT 'x123y' == 'x0123y' COLLATE natsort;
~~~~