SQL从N条记录开始查询怎么写

来源:百度知道 编辑:UC知道 时间:2024/06/17 20:07:30
是这样的
我要在表table 里查 type字段等于“工作动态”的记录,
要从第N条记录开始的。

谢谢

select * from table where type='工作动态' and ID not in (select top N id from table order by XX desc)
ID为表中主键

sql没有这个功能,你只能加上自动编号字段,或者呢,
select * from 表 where id not in (select top n-1 id from 表)