发布网友 发布时间:2022-04-07 16:45
共2个回答
热心网友 时间:2022-04-07 18:14
1.rownum分页查询:select t2.* from (select t1.*,rownum as rn from table_name t1 where 1=1 and rownum <= page * page_size) t2 where t2.rn > (page - 1) * page_size;2. row_number() over() 分页查询select t2.* from (select t1.*,row_number() over(order by column_name desc) as rn from table_name t1 where 1=1 )t2 where t2.rn > (page-1)* page_size and t2.rn <= page * page_size;热心网友 时间:2022-04-07 19:32
SELECT B.* FROM (SELECT A.*, ROWNUM RN FROM (#page# 页码(第几页)
#row# 每页显示条数