不同数据库SQL语句分页

mysql 分页
select * from t_order limit 5,10



[b]postgresql 分页[/b]

select * from newscontent limit 20 offset 0

sql server 分页

select * from (select top 10 * from (select top (10*6) * from tr_data_userinfo order by available asc) as temptable1 order by available desc) as temptable2 order by available asc



Oracle 分页(rownum)

minus差分页 select * from table where rownum<=10 minus select * from table where rownum<=5

rownum伪列select * from (select rownum tid,t.* from table t where rownum<=10) where tid<=10 and tid>=5

notin相反select * from table where id not in(select id from table where rownum<=5) and rownum<=5

前题是id排序的select * from table where id>(select max(id) from table where rownum<=5) and rownum<=5
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值