代码:
报错代码
设置mysql分隔符为//
delimiter //
drop procedure if exists while1;
create procedure while1()
begin
declare i int default 0;
set i = 0 ;
while i < 10 do
insert into test_table(tname) values('TestName1');
set i = i + 1 ;
end while;
select * from test_table;
end
//
call while1();
delimiter ;
报错内容
Error Code: 2014 Commands out of sync; you can't run this command now
标签:存储,set,end,while1,报错,MySQL,table,执行 From: https://www.cnblogs.com/HookDing/p/16786649.html