I would like to create a procedure with a while but I have an error.
Here is my procedure:
Delimiter //
create procedure procedure1 ()
BEGIN
Declare i INT;
set i=1;
while i< 74 do
execute immediate 'insert into main values(3,"samples")'
set i=1+1;
end while;
end //
I got this error
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that on for the right syntax to use near ''insert into main values(3,"samples")'
Someone has an idea please?