发布网友 发布时间:2022-04-07 17:04
共2个回答
懂视网 时间:2022-04-07 21:25
1、Oracle分页查询写法:
select * from (select rownum,name from table where rownum <=endIndex )
where rownum > startIndex
2、DB2分页查询
SELECT * FROM (Select 字段1,字段2,字段3,rownumber() over(ORDER BY 排序用的列名 ASC) AS rn from 表名) AS a1 WHERE a1.rn BETWEEN 10 AND 20
以上表示提取第10到20的纪录
select * from (select rownumber() over(order by id asc ) as rowid from table where rowid <=endIndex )
where rowid > startIndex
3、MySQL分页查询
select * from table limit start,pageNum
数据库DB分页查询
标签:数据库分页查询
热心网友 时间:2022-04-07 18:33
select top /显示条数/ * from table_A where id not in (select top /(页码-1)*显示条数/ id from table_A)