SQLite Select DISTINCT Values of a Column without Ordering

前端 未结 3 1640
执念已碎
执念已碎 2021-02-05 05:03

I would like to know whether its possible to get a list of distinct values in a SQLite Column without ordering them.

I tried following query. But it automatically orders

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-05 06:10

    What do you mean "without ordering"? There's no natural order implied in a SQL table, so the default ascending order by column from left to right is as good as any other order. If you prefer another order, SELECT DISTINCT does accept an ORDER BY clause.

提交回复
热议问题