select top size * from 表名 where(表id not in(select top size*(index-1) 表id from 表名 order by 表id ASC)) order by 表id
select * from(select ROW_NUMBER() over(order by lid)as t ,* from 表名) as n where t between size and size*(index-1)
SELECT * FROM 表名 WHERE 表id in ( SELECT top size 表id FROM (SELECT top count-size*(index-1) 表id FROM 表名 order by 表id DESC ) TT ORDER BY TT.表id asc ) ORDER BY 表id asc
时间: 2024-12-25 18:36:28