mysql,sqlServer,oracle分页查询

来源:互联网 发布:php c2c 编辑:程序博客网 时间:2024/04/28 23:38

mysql:

select * from userlist  order by userId limit n,m

 

MS SQL Server 中 :
select top (m-n) * from userList where userid not in
(select top  n userid from userList  order by userid) order by userid

 

Oracle 中 :
select * from (select rownum no,* from userlist where rownum<=m) where no>=n;

原创粉丝点击