SQL语句,查询数据库中间连续的记录
2007-12-02 11:21
591 查看
如果想取出数据表中中间的连续记录,如:数据表中共有20条记录,现在想取出7--14条的记录,则可以使用下面的代码来实现:
select top 7 fromwhere ID not in (select top 7 [ID] from order by id desc) order by id desc
select top 7 from