Mysql批量添加数据
方法一:建一个存储过程
方法二:会话变量
set @varname = value; insert into tbl_name(col1,col2,col3,col_varname) values(val1,val2,val3,@varname),(val21,val22,val23,@varname),(val31,val32,val33,@varname)
如果这篇文章对你有用,可以关注本人微信公众号获取更多ヽ(^ω^)ノ ~
![微信公众号二维码](https://images.cnblogs.com/cnblogs_com/aeolian/1679458/o_wechat_gzh_qrcode.jpg)
方法一:建一个存储过程
方法二:会话变量
set @varname = value; insert into tbl_name(col1,col2,col3,col_varname) values(val1,val2,val3,@varname),(val21,val22,val23,@varname),(val31,val32,val33,@varname)