1. Oracle Database Paging Select* FROM (select A.*,rownum rc from table name where Rownum<=endrow) a where a.rc>=StartRow2. DB2 Database Paging Select* FROM (select RowNumber () over () as rc,a.* from (SELECT *From table name order BY column name) as a) where RC between StartRow and Endrow3. SQL Server 2000 database paging Select top pagesize* FROM table name where column name not in (select top pagesize*page column name from table name order BY column name) Order BY column name4. SQL Server 2005 Database paging Select* FROM (select column name, Row_ search number () over (Order by column name 1) as alias from table name) as T where T. Column name 1>=startrow and T. Column name 1<=Endrow5. MySQL Database paging Select*from table name limit startrow,pagesize (PageSize is the number of record bars displayed per page)6. PostgreSQL Database Paging Select*from table name limit Pagesize,offset StartRow (pagesize the number of record bars displayed per page.) 7. General Mode Select* FROM (SELECT * from tb_student where SID is not in (select Sid from Tb_student where rownum<= (currentPage-1) *pagesize)) where RowNum <=pageSize;
Paged query statements for various databases