CREATE PROCEDURE test() #創(chuàng)建存儲(chǔ)函數(shù);
BEGIN
DECLARE i INT DEFAULT 1;
WHILE i < 10 DO
#下面的insert語(yǔ)法要改成自己的表,同時(shí)構(gòu)造value.id,要考慮防重;
INSERT INTO `rs_test`(`title`) VALUES (CONCAT('test',i));
SET i = i+1;
end WHILE;
END;
CALL test();#調(diào)用存儲(chǔ)函數(shù)