SQL分页语句2007-05-31 动态网站制作指南 -前提是必需有一列是自动增长类型,唯一性--方法一SELECT DISTINCT TOP 8 CategoryID
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--方法二select top 10 * from [order details]
where orderid>all(select top 10 orderid from [order details] order by orderid)
order by orderid