1DROP PROCEDURE IF EXISTS test_insert; 2 3DELIMITER ;; 4CREATE PROCEDURE test_insert () 5BEGIN 6 7DECLARE i int; 8set i=14; 9WHILE i<30 10DO 11 insert into student(name,age,nianji,phone) values(CONCAT('hh',i),CONCAT(i,''),'1','123'); 12SET i=i+1; 13END WHILE ; 14commit; 15 16END;; 17 18call test_insert () ;
mysql for循环存储过程
Wesley13
2021-10-11
924 0 0
点赞
收藏
评论区
加载中...