以下为引用的内容:
DROP PROCEDURE test_insert ;
DELIMITER ;;
CREATE PROCEDURE test_insert ()
BEGIN
DECLARE i INT DEFAULT 0;
WHILE i<10
DO
INSERT INTO CMS.CMS_Module
(
ModuleType,
ModuleName,
ModuleDescription,
DesignHTML,
QUERY
)
VALUES
(
'2',
CONCAT('活动',i),
'测试加入',
'aaaaaaaaaa',
''
);
SET i=i+1;
END WHILE ;
END;;
CALL test_insert();