主流数据库分页语句 mysql DB2 oracle sybase ase
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 ROWID, DESCRIPTION from SS.T_ROLE ) 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