插入数据以及答案--取出sql表中第到的记录(以自动增长ID为主键) --从数据表中取出第n条到第m条的记录*/ create table t ( id int, name nvarchar(20) ) declare @id int select @id=1 while(@id<=100) begin insert t select @id,'Name'+cast(@id as nvarchar) set @id=@id+1 end select * from t select top 10 * from (select top 40 * from Account where id not in (select top 30 id from Account ) ) t drop table t