mysql数据库中使用循环添加数据。怎么我不行呀?

已经测试,创建并运行下面的存储过程可以循环添加数据:create procedure dowhile()begin declare i int default 0;start transaction;while i
mysql数据库中使用循环添加数据。怎么我不行呀?
已经测试,创建并运行下面的存储过程可以循环添加数据:
create procedure dowhile()
begin
declare i int default 0;
start transaction;
while i<50 do
insert into users(userId,userName,userPwd) values(null,concat('s00',i),123456);
set i=i+1;
end while;
commit;
end;
delimiter;2010-08-26
mengvlog 阅读 49 次 更新于 2025-12-26 03:24:25 我来答关注问题0
檬味博客在线解答立即免费咨询

mySQL相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部