用sql语句如何查询前10行之后的10行

如题所述

第1个回答  2013-08-11
select top 10 * from 表名 select top 10 * from 表名 order by 自动增长编号 desc 请把上述两行的汉字替换成你的表名或列名(字段名)
第2个回答  2013-08-11
两次排序 升序取前20 再降序取前10
第3个回答  2013-08-12
select top 10 * from A where mainKey is not in
(
select top 10 mainKey from A
)
A为表名,mainKey为表的主键本回答被网友采纳
第4个回答  2013-08-11
select top(20) * from 表where lsh not in(select top(10) lsh from 表where 条件) and 条件
第5个回答  推荐于2017-09-29
select top 10 * from (select top 20 * from 表 order by id asc) as a order by id desc
相似回答