SELECT * FROM (
SELECT A.*
, ROWNUM RN
FROM (
SELECT
字段,
count(1) over () total -- 返回总条数
FROM table WHERE A1 ='2'
) A WHERE ROWNUM <= {第几页} * {当前页数量}
)WHERE rn > ({第几页} - 1) * {当前页数量}"
2021-05-14 SQL 分页,返回总条数,自定义字段
最新推荐文章于 2024-05-29 17:06:06 发布