0
我的名片夾數據庫具有行 表進行排序:如何通過順序多列的字母順序
lastname text, firstname text, number text
我查詢得到排序結果按字母順序顯示,以「姓氏」第一排序和「名字「第二次排序,然後選擇‘數字’,我想列出哪個人最後(下)有NULL字段
目前我使用
select * from table order by lastname IS NULL,firstname IS NULL ,number IS NULL
但不是爲好,不僅通過「IS NULL」
select * from table
order by
lastname IS NULL, lastname,
firstname IS NULL, firstname,
number IS NULL, number
由於SQLite的使用0
爲FALSE
和1
爲TRUE
空條目應該放在最後排序正確
多德你救了我的一天!噸的感謝,浪費了很多時間與錯誤。 – virtplay