查询[start,start+limit],包含start,包含start+limit,如start=21,limit=10结果就是21到30,包含21和30SELECT * FROM (SELECT A.*, rownum rn FROM (SELECT * FROM tableName ORDER BY time DESC ) A WHERE rownum <= start + limit ) B WHERE rn >= start;
时间: 2024-11-03 21:46:17
查询[start,start+limit],包含start,包含start+limit,如start=21,limit=10结果就是21到30,包含21和30SELECT * FROM (SELECT A.*, rownum rn FROM (SELECT * FROM tableName ORDER BY time DESC ) A WHERE rownum <= start + limit ) B WHERE rn >= start;