取出表A中第31到第40记录,以自动增长的ID作为主键,改怎么写SQL?

写出一条Sql语句: 取出表A中第31到第40记录(SQLServer, 以自动增长的ID作为主键,  注意:ID可能不是连续的。)

该怎么写这个SQL语句

neptune -
  • csharper - 1年前

    select top 10 * from  Table where ID not in (select top 30 ID from  Table)

  • skyworld - 1年前

    select top 10 * from (select * from table where id not in (select top 20 id from table1))