日期:2014-05-18  浏览次数:20535 次

这个Sql怎么写?小弟求教了!
大家都知道,top关键字是返回前多少条数据,
可我现在想返回第多少,到第多少条数据,应该怎么写啊?
如:
select   top   10   a1,a2   from   A   where   ...

那么我想要第11到第20的数据这怎么弄啊?
Sql里有关键字吗?

------解决方案--------------------
select top 10 a1,a2 from A where 排序字段 Not In (Select TOP 10 排序字段 From A Order By 排序字段)
------解决方案--------------------
select top 10 * from t
where 主键 not in (select top 10 主键 from t)