sqlServer not in 分页

select top 10 * from GoodsTab WHERE GoodsID NOT IN (
SELECT TOP (10*(2-1) GoodsID FROM dbo.GoodsTab WHERE GoodsTypeID=2 ORDER BY GoodsID DESC ) AND GoodsTypeID=2 ORDER BY GoodsID DESC

 

posted @ 2020-02-13 21:11  进阶的哈姆雷特  阅读(223)  评论(0编辑  收藏  举报