现在的位置: 首页 > 综合 > 正文

null值在排列时候的问题

2013年06月19日 ⁄ 综合 ⁄ 共 165字 ⁄ 字号 评论关闭

进行升序时候要求数量为null的排在首位:

select name,quantity from productinfo order by quantity  nulls first;

进行降序时候要求数量为null的排在末尾:

select name,quantity from productinfo order by quantity  nulls last;

抱歉!评论已关闭.