ibatis中批量插入、更新、删除数据的写法

微信公众号: 51码农网
专业编程问答社区
www.51manong.com

数据库是oracle
1.批量插入数据:


  insert all
    
      into  tableA(custom,flag) values
       (#dataList[].custom#,#dataList[].flag#)
     
    select * from dual

2.批量删除数据


  delete from tableA where custom in
   
     #dataList[].custom#
   

一次传入list的数据不要超过1000,用的是in2.批量更新数据
3.批量更新数据


  update  tableA set flag='1'  where custom in
   
     #dataList[].custom#
   

你可能感兴趣的:(oracle)