親測成功!可用,複製便可spa
DELIMITER ;;
CREATE PROCEDURE test_insert()
BEGIN
DECLARE y TINYINT DEFAULT 1;
WHILE y<10
DO
INSERT INTO sysuser_user_deposit_log(log_id, type, user_id, operator, fee, message, logtime, deposit) VALUES (NULL, 'expense', '4903', 'system', '0.500', '用戶抽獎,抽獎單號:1807261600465829', '1532592017', NULL);
SET y=y+1;
END WHILE ;
commit;
END;;
CALL test_insert();it