如何返回从表的第N条记录开始到末尾的数据

解决方案 »

  1.   

    select * from 表 where 主键 not in (select top 数字  主键 from 表)
      

  2.   


    select *
    from table 
    where id not in (select top n id from table )
      

  3.   

    select * from table where id not in (select top n id from table )
      

  4.   

    select * ,identity(int,1,1) as aa
    into #aa 
    from table select * 
    from #aa 
    where aa>=n
      

  5.   

    to 2L3L, 我的表中没有类似ID编号这类主键~to 6L, 编译通过,但执行时候报错Cannot add identity column, using the SELECT INTO statement, to table '#aa', which already has column 'ID' that inherits the identity property.
      

  6.   

    Cannot add identity column, using the SELECT INTO statement, to table '#aa', which already has column 'ID' that inherits the identity property.---------------------------------
    是不是你的表有id 字段??lwl0606(寒泉) 的方法是正确的
      

  7.   

    s column 'ID' that inherits the identity property. 
     是说你有一个字段ID 具有 identity  属性,这个字段就可以做主键来用,
    这样就可以了
    select *
    from table 
    where id not in (select top n id from table )