以下為引用的內容:
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();