mysql,sqlServer,oracle分页查询

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;

你可能感兴趣的:(mysql,sqlServer,oracle分页查询)