常用的OracleSQL

来源:互联网 发布:桌游矩阵潜袭 编辑:程序博客网 时间:2024/04/29 12:23

1. 以某个字段排序后查询第N到M条记录

select * from (select * from (select rownum, product_id, product_namefrom product order by product_id)
where rownum <= 8 ) where product_id not in (select product_id from productwhere rownum<=2)
原创粉丝点击