DELIMITER $$
CREATE PROCEDURE process_test3()
BEGIN
DECLARE yourid INT;
SET yourid = 100000;
WHILE yourid < 2000000 DO
INSERT INTO tt
(order_no
)
VALUES(yourid);
SET yourid=yourid+1;
END WHILE;
END;
CALL process_test3();
-- 查看所有的存储过程
SHOW PROCEDURE STATUS;
--执行完毕自动删除,事了拂衣去,深藏身与名。
DROP PROCEDURE test_insert8;