SELECT * FROM 用户表 ORDER BY IFNULL(nickname, realname); SELECT IFNULL(NULL,10); -- > 10--该片段来自于http://www.codesnippet.cn/detail/230120131885.html
来源: http://www.codesnippet.cn/detail/230120131885.html