SQLite Forum

DESC keyword is ignored
Login
I believe what is going is on is that ‘Id’ is a constant expression. 
So every row is being compared with each other for the the ordering to work.

In effect with a constant string : every row looks to be equal and therefore the ASC/DESC have no effect.
(And probably it *looks* like ASC is working due to the (more or less) arbitrary ordering on “id” by default (i.e : it’s as if no ORDER BY clause is present at all)

Beware (this got me) - if you use a numeric - e.g “ORDER BY 2” - this *will* have an effect as I this case the numeric acts as an index for a column…but *only* as a “literal”.
That is “ORDER BY 2” will order by the 2nd column - but “ORDER BY 1+1” will not. (That is a “constant” value 2).