SQLserver数据库分页,Oracle数据库分页
1.SQLserver分页:
SELECT * FROM( SELECT TOP end ROW_NUMBER() OVER(ORDER BY tableName.id ASC) AS ROWID,* FROM tableName ) AS TEMP WHERE ROWID>= stat
注:tableName表名,tableName.id排序字段,stat开始索引,end结束索引
2.Oracle分页:
SELECT * FROM (SELECT A.*, ROWNUM RN FROM (SELECT * FROM tableName ) A and ROWNUM <= end )WHERE RN >= stat
注:tableName表名,stat开始索引,end结束索引