为空的数据排在后面,有值的数据排在前面(last函数 )

 


-- 将name为空的值排在后面
select * from userinfo ORDER BY name DESC nulls last 

 

posted @ 2020-08-21 15:01  万里哥  阅读(304)  评论(0编辑  收藏  举报