drop procedure if exists prc_bill_xxx;
CREATE PROCEDURE prc_bill_xxx(l_cnt int) BEGIN DECLARE x INT DEFAULT 0; DECLARE p varchar(256); WHILE x < l_cnt DO SET x = x + 1; SET p =300000000000001+x; INSERT INTO bill_xxx(ACCOUNT_LOG_ID, BUSINESS_SERIAL_NO, POS_ORDER_ID, HAPPEN_TIME, IN_AMOUNT, OUT_AMOUNT) VALUES ( p, "11111", "22222", "2021-07-10", "111.11", "2.22"); END WHILE; end
call prc_bill_xxx(10010);