mysql创建函数
CREATE FUNCTION fun1()
RETURNS INT
BEGIN
DECLARE num INT ;
DECLARE i INT ;
set num = 10000;
set i = 2;
WHILE i<=10000 DO
INSERT INTO student(`name`) VALUES(CONCAT('用户',i));
set i=i+1;
END WHILE;
RETURN i;
END
SELECT fun1()
本文来自博客园,作者:弩哥++,转载请注明原文链接:https://www.cnblogs.com/bangbangzoutianya/p/15987727.html