make zero appear last in a list of ascending numbers

后端 未结 5 1249
悲哀的现实
悲哀的现实 2020-12-19 22:06

I\'m using SQLite in an Android application.
In all of my tables I have a default row with an index of 0 that holds default values for that table.
In most situations

5条回答
  •  执念已碎
    2020-12-19 22:38

    Equivalent to the CASE statement suggestion, but shorter:

     ORDER BY epoch_date.epoch == 0, epoch_date.epoch
    

提交回复
热议问题