大家看看哪里有问题
use pubsgo
if exists(select * from sysobjects where name = 'test')
drop table test
go
create table test
(
pid int default(32),
rid int default(1),
uid int,
)
go
insert into test(uid) values(1)
go
--创建存储过程
if exists(select * from sysobjects where name = 'tt')
drop proc tt
go
create proc tt
as
declare @num int
select @num=uid from test
while @num<=514
begin
insert into test(uid) values(@num)
set @num=@num+1
end
go
exec tt
go
select * from test
go
--delete test