mysql 批量往表中增加测试数据

 

 

 

 
# 查看存储过程的创建语句:show create procedure 存储过程名;
 
 

drop procedure pre;  #删除存在存储过程

create procedure pre()		#//创建pre()存储方法
begin
declare i int;		#//定义i变量
set i=6021;
while i<10000 do		#//对i的值配置
	insert into test1 (id3,name3,age3)
	values(i,concat('姓名', i),i); 
set i=i+1;		#//自增循环
end while;
end  
 
call pre();		#调用pre()存储方法 

 

 

 

 

mysql 批量往表中增加测试数据_第1张图片

你可能感兴趣的:(mysql)