创建一张表:
create table student
(id int identity(101,1) primary key,
sname varchar(20),
gender char(2) default '男'
)
创建存储过程:
create procedure proc_student
as
declare @i int
set @i=1
while @i<1000001
begin
insert into student(name,gender) values('kewen','男')
set @i=@i+1
end
执行存储过程:
execute proc_student