DROP PROCEDURE addSuchData;
DELIMITER $$
CREATE
PROCEDURE addSuchData(in i int)
BEGIN
DECLARE id int unsigned default 1;
DECLARE trade_order_id int unsigned default 10;
WHILE i < 2000 DO
INSERT INTO `T_EIPO_STOCK_SUBSCRIBE_ORDER`(`id`, `trade_order_id`, `account_id`, `account_name`, `account_type`, `ae_code`, `ae_name`, `stock_code`, `stock_name`, `subscribe_type`, `subscribe_qty`, `subscribe_price`, `subscribe_fee`, `subscribe_total_amount`, `currency`, `actual_qty`, `actual_amount`, `refund_amount`, `bourse_refund_amount`, `apply_channel`, `trade_status`, `call_abc_eipo_no`, `remark`, `reason`, `apply_date`, `cancel_date`, `retry_count`, `complete_date`, `created_by`, `created_at`, `updated_by`, `updated_at`) VALUES (id, CONCAT('TC',CAST(trade_order_id AS CHAR)), '511163', '你明明', 'CUST', '988', NULL, '08645', 'NOMAD TECH', 'CASH', '6000', 2424.1800, 30.0000, 2454.1800, 'HKD', '0', 0.0000, 0.0000, 0.0000, 'APP', 'ACCEPT_SUCCESS', '124956', NULL, NULL, '2019-11-26 14:24:21', NULL, '0', NULL, '511163', '2019-11-26 14:24:21', '511163', '2019-11-26 14:24:21');
SET i=i+1;
SET id=id+1;
SET trade_order_id=id+10;
END WHILE;
END$$
DELIMITER ;
CALL addSuchData(0);