Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用具有空值和非空值且非空值的字段对列表进行排序。
尝试
ORDER BY CASE WHEN <COL> IS null THEN 1 else 0 END
这将首先排序具有 NOT NULL COL 值的行,然后是具有 NULL COL 值的行