关于sqlserver 的top多表分页,SQL查出的数据都是一样的,无分页效果

select top 10* from B_goodsPara a,b_goods b,B_ShopGoods c where a.GOODSSKU=b.SKU AND a.SHOPSKU=c.SKU and b.GoodsStatus='在售' and b.NID not in (select top 1 NID from b_goods order by NID)

求改良,谢谢,在线等

1个回答

 SELECT * FROM ARTICLE w1,   
(  
    SELECT TOP 30 ID FROM   
    (  
        SELECT TOP 1030 ID, YEAR FROM ARTICLE ORDER BY YEAR DESC, ID DESC  
    ) w ORDER BY w.YEAR ASC, w.ID ASC  
) w2 WHERE w1.ID = w2.ID ORDER BY w1.YEAR DESC, w1.ID DESC 

仿照这个来写

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问