mysql 中插入數(shù)據(jù),如何使用Mysql腳本插入數(shù)據(jù)流到數(shù)據(jù)庫內(nèi)?
已經(jīng)測試,創(chuàng)建并運(yùn)行下面的存儲過程可以循環(huán)添加數(shù)據(jù):
create procedure dowhile()
begin
declare i int default 0;
start transaction;
while i
insert into users(userId,userName,userPwd) values(null,concat('s00',i),123456);
set i=i+1;
end while;
commit;
end;
delimiter;