My SQL (Navicat中执行)
-- 批量生产数据
delimiter $$
create procedure prea()
begin
declare i int;
set i=2;
while i<400 do
INSERT INTO user_new VALUES
( '普通用户', '2015-1-11', '张san1', i, '男', '15215445598', '104525444@qq.com', '浙江省杭州市余杭区', '急诊科','anv','12312d' );
set i=i+1;
end while;
end
$$
call prea();
DROP procedure prea;
SQL Server
> -- 批量生产数据
declare @i int
set @i=1
while @i<=2
begin
>INSERT INTO user_new VALUES
( '普通用户', '2015-1-11', '张san1', @i, '男', '15215445598', '104525444@qq.com', '浙江省杭州市余杭区', '急诊科','anv','12312d' );
set @i=@i+1;
end
SELECT * FROM user_new;
网友评论