–前提是必需有一列是自动增长类型,唯一性 –方法一 SELECT DISTINCT TOP 8 CategoryID –方法二 select top 10 * from [order details]
FROM tbl_Product_Products
WHERE (UserID = 73) AND (CategoryID >
(SELECT MAX(categoryid)
FROM (SELECT DISTINCT TOP 16 categoryid
FROM tbl_product_products where userid=73
ORDER BY categoryid) AS b))
ORDER BY CategoryID
where orderid>all(select top 10 orderid from [order details] order by orderid)
order by orderid
sql分页语句_数据库技巧
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » sql分页语句_数据库技巧
相关推荐
- 暂无文章
