delimiter \
CREATE PROCEDURE proc_while () BEGIN
DECLARE num INT;
SET num = 0;
WHILE num < 10
DO
INSERT INTO Module_49 (
)
VALUES
(
);
SET num = num + 1;
END WHILE;
END \ delimiter;
调用存储过程:
CALL proc_while()
删除存储过程
DROP PROCEDURE proc_while1;
反引号:字段与mysql关键字重复,要用反引号。