妈的,,真奇怪,写个存储过程妈的,这么简单的事情。就是他妈的多个空格少个空格。真他娘的麻烦。搞了老子半天。
DELIMITER // CREATE PROCEDURE pro11() BEGIN DECLARE i INT DEFAULT 0; REPEAT INSERT INTO payout(userId,payOutName,payOutMoney,payOutDate) VALUES(232,"zhangsan",34,"2013-01-22"); SET i=i+1; UNTIL i>=100 END REPEAT; END// DELIMITER ;
DELIMITER // CREATE PROCEDURE test() BEGIN DECLARE i INT DEFAULT 0; WHILE i<100 DO INSERT INTO payout(userId,payOutName,payOutMoney,payOutDate) VALUES(1,"zhangsan",1,"2013-01-22"); SET i=i+1; END WHILE; END; // DELIMITER ;
时间: 2024-10-17 00:03:27