sql查询二

  --从people1中取出第n到第m条的数据
select top m-n+1 *
from people1
where (ID not in(select top n-1 id from people1))

--不在前4条的id(id是5+)中的前四条

例如:--从people1中取出第五到第八条的数据
select top 4 *
from people1
where (ID not in(select top 4 id from people1))

原文地址:https://www.cnblogs.com/jksun/p/8352076.html