DELIMITER ;;
CREATE PROCEDURE test_insert ()
BEGIN
DECLARE i INT DEFAULT 1;
WHILE i<100
DO
insert into goods(good_name,good_price,de) values ('gui',i,'hao');
SET i=i+1;
END WHILE ;
commit;
END;;
CALL test_insert();
2022-08-18 19:29:18
DELIMITER ;;
CREATE PROCEDURE test_insert ()
BEGIN
DECLARE i INT DEFAULT 1;
WHILE i<100
DO
insert into goods(good_name,good_price,de) values ('gui',i,'hao');
SET i=i+1;
END WHILE ;
commit;
END;;
CALL test_insert();