您好,欢迎来到华佗小知识。
搜索
您的当前位置:首页mybatis语句批量新增语句

mybatis语句批量新增语句

来源:华佗小知识
mybatis语句批量新增语句

mybatis中语句

insert into investor_file_info (id,

userid, url, type,

uploaddate, path,

approve_id )

select SEQ_INVESTOR_FILE_INFO.NEXTVAL , A.* from(

select #{item.userId}, #{item.investorUrl}, #{item.investorType}, sysdate,

#{item.investorPath},

#{item.investorApproveId} from dual )A

oracle数据库中运⾏是下⾯这种代码insert into testcuijia(id,name,sex)select seq_home_banner.nextval,A.* from ( select '11','男' from dual union select '22','⼥' from dual) A

mysql⼀样,只是序列不⽤写了,直接⽤⾃增主键就可以insert into testcuijia(name,sex)select A.*

from ( select '11','男' from dual union select '22','⼥' from dual) A

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuo0.cn 版权所有 湘ICP备2023017654号-2

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务