create proc pr_inc
@base_num int,
@incr_num int
--@base_num为查找的n,@incr_num 为n以外要查找的n
as
select top (@base_num+@incr_num) * from table --
where table_id not in (select top @base_num table_id from table )
--table 为你的源表,table_id为你源表的唯一标示符
go
create proc pr_inc
@base_num int,
@incr_num int
--@base_num为查找的n,@incr_num 为n以外要查找的n
as
select top (@base_num+@incr_num) * from table --
where table_id not in (select top @base_num table_id from table )
--table 为你的源表,table_id为你源表的唯一标示符
go