SELECT * FROM
(
SELECT TOP 5 * FROM
(
SELECT TOP 10 *
FROM table
ORDER BY id DESC
) t1
ORDER BY id
) t2
ORDER BY id DESC
上面的代码表示从 table 表中获取记录,每页5条记录,当前是第二页5*2=10,结果按照 id 倒序
完了不废话
SELECT * FROM
(
SELECT TOP 5 * FROM
(
SELECT TOP 10 *
FROM table
ORDER BY id DESC
) t1
ORDER BY id
) t2
ORDER BY id DESC
上面的代码表示从 table 表中获取记录,每页5条记录,当前是第二页5*2=10,结果按照 id 倒序
完了不废话