select top 8 * from 表 where 主键 not in (select top 1 主键 from 表)
在MS SQL中可以这样:
select top 200 * from TabelA order by MyKey
where MyKey not in
(select top 100 MyKey from TableA order by MyKey)
前面的101-200条记录就出来了。
select top(8) * from nsort where id not in(select top(8*(1-1) ) id from nsort
从第9条开始时 把(1-1)换成2-1 在后面(3-1) 以此类推
select top 8 * from nsort order by nsort_id desc 这个是取前8条的
select * from nsort where not in(select top 8 * from nsort order by nsort_id desc) order by nsort_id desc 这个是第九条之后的。。。
查询1-8条
select top 8 * from nsort order by nsort_id desc
查询第9条以后
select * from nsort
where nsort_id not in
(select top 8 nsort_id from nsort order by nsort_id desc)
sql="select top 8 * from nsort order by nsort_id desc
sql="select * from nsort order by nsort_id desc where recno()>8