sql 分页查询问题
在网找得我用这个做分页查询怎么不好使呢请大家指教
SELECT TOP 页大小 *
FROM table1
WHERE id >
(
SELECT ISNULL(MAX(id),0)
FROM
(SELECT TOP 页大小*(页数-1) id FROM table1 ORDER BY id ) A )
ORDER BY id
[解决办法]
SELECT TOP 页大小 *
FROM table1
WHERE id >
(
SELECT ISNULL(MAX(id),0)
FROM
(SELECT TOP (页大小*(页数-1)) id FROM table1 ORDER BY id ) A )
ORDER BY id