mysql数据库存储过程与函数
mysql数据库存储过程与函数
存储过程
create procedure batchInstert(in args int)
begin
declare i int default 1;
start transaction;
while i <= args do
insert into car(carId,carName) value (i,concat("微笑着面对它-",i));
set i=i+1;
end while;
commit;
end
运行语句
call batchInster
原创
2022-05-28 10:34:21 ·
230 阅读 ·
0 评论