- 一、Mybatis批量更新Oracle
- 1、mapper
- 2、xml
- 二、Mybatis批量更新Mysql
- 1、mapper
- 2、xml
一、Mybatis批量更新Oracle
Mybatis写Oracle的批量更新要加begin end匿名存储过程,否则程序会报无效字符异常。
1、mappervoid updateTable_oracle(@Param("list") List
2、xml
二、Mybatis批量更新Mysql 1、mapperupdate STUDENT t set t.student_name='${item.student_name}' and t.age='$item.age}' and t.address='${item.address)' and t.time=to_date('${item.time}','yyyy-mm-dd hh24:mi:ss')
void updateTable_mysql(@Param("list") List
2、xml
update STUDENT t set t.student_name='${item.student_name}' and t.age='$item.age}' and t.address='${item.address)' and t.time=to_date('${item.time}','yyyy-mm-dd hh24:mi:ss')



