不用 top 方式的分页

declare @ttb table(
    [undid] [int] not null IDENTITY (1, 1) ,
    [ID] [int]   not null Primary key)

set RowCount   60

insert into @ttb select id from dbo.qqqq where Isction=0 and Isld=0 and QueeID<>3

SELECT * FROM dbo.qqqq WHERE ID in (select ID from @ttb where undid>40)

你可能感兴趣的:(top)