不用 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)
posted @ 2011-04-23 16:42  caicainiao  阅读(174)  评论(0编辑  收藏  举报