mysql升序将0或者null排到最后
2021-12-01 leiting (2110阅读)
标签 MySql
将null排在最后
order by if(isnull(level), 99999, level) asc
将0排在最后
1.Order BY表达式 SELECT nian ,gz from Tbl ORDER BY gz!=0 desc,gz asc 2.算术法 SELECT nian ,gz,1/gz as od from Tbl ORDER BY od desc
最新评论:
最新评论: