DELIMITER ;;
CREATE PROCEDURE test_insert2 ()
BEGIN
DECLARE i INT DEFAULT 1;
WHILE i<100000
DO
insert into four_forecast_result_for_xtl_dc(id,sku_id,dc_id) values (i,FLOOR(i +(RAND()*6)),FLOOR(i +(RAND()*5)));
SET i=i+1;
END WHILE ;
commit;
END;;
CALL test_insert2();
网友评论