SQL 的分页

xiaoxiao2025-12-31  4

with temptbl as ( -----临时表名 SELECT ROW_NUMBER() OVER (ORDER BY id desc)AS Row, * from 表名 ... ) SELECT * FROM temptbl where Row between @startIndex and @endIndex select top 每页显示的记录数 * from topic where id not in (select top (当前的页数-1)×每页显示的记录数 id from topic order by id desc) order by id desc
转载请注明原文地址: https://www.6miu.com/read-5041809.html

最新回复(0)