oracle 数据库 order by 排序的使用

来源:互联网 发布:99porn永久域名av123 编辑:程序博客网 时间:2024/05/21 10:26

order by 排序

    ORDER BY _column1, _column2; /* _column1升序,_column2升序 */  

   ORDER BY _column1, _column2 DESC; /* _column1升序,_column2降序 */ 

   ORDER BY _column1 DESC, _column2 ; /* _column1降序,_column2升序 */ 

   ORDER BY _column1 DESC, _column2 DESC; /* _column1降序,_column2降序 */


如果  排序的值为null  怎么办?

 oracle 中 字段为null 则默认排最后面  

 order by  column  desc   nulls first    /* 空值排最前面  同理 last 排最后面*/ 

阅读全文
0 0
原创粉丝点击