我是靠谱客的博主 俊秀裙子,这篇文章主要介绍MySQL使用存储过程循环插入数据,现在分享给大家,希望可以做个参考。

delimiter //
create procedure myproc()
begin
declare num int;
set num=1;
while num < 10 do
insert into t_tag(tag_name, tag_desc) values(concat("tag", num), concat("tag", num)); set num=num+1;
end while;
end//

最后

以上就是俊秀裙子最近收集整理的关于MySQL使用存储过程循环插入数据的全部内容,更多相关MySQL使用存储过程循环插入数据内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(50)

评论列表共有 0 条评论

立即
投稿
返回
顶部