批量插入存储过程

CREATE PROCEDURE P1()
BEGIN 
DECLARE i INT;

SET i=1;


WHILE

i < 100000 

DO

INSERT INTO cp_coupons_detail 
VALUES
(
CONCAT('CPZW00000000', 60000000 + i),
'column2',
'column3',

 'column4',

);

set i=i+1;

END WHILE; 

END

猜你喜欢

转载自blog.csdn.net/showgea/article/details/80525068
今日推荐