取出表A中第31到第40记录(SQLServer, 以自动增长的ID作为主键, 注意:ID可能不是连续的。
------解决方案--------------------------------------------------------
- SQL code
SELECT TOP 10 *FROM (SELECT TOP 40 * FROM tb ORDER by id) tORDER BY id desc
SELECT TOP 10 *FROM (SELECT TOP 40 * FROM tb ORDER by id) tORDER BY id desc