navicat 批量生成测试数据

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();

你可能感兴趣的:(navicat 批量生成测试数据)