oracle:
select * from (select a.*,rownum rn from (select * from tab) a where rownum<=rows) where
rn>=((page-1)*rows);
DB2:
select * from (
select ROWNUMBER() OVER() as
) as a where a.ROWID >=5 and a.ROWID
<=8;
mysql:
select * from table limit 1,10;
sybase ase:
select syb=identity(10) ,* into #msg_content from
msg_content
select * from #msg_content where syb>=1 and
syb<=10 drop table #msg_content
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/21561430/viewspace-1116267/ ,如需转载,请注明出处,否则将追究法律责任。