Home > database >  Ibaits in batch update problem
Ibaits in batch update problem

Time:10-04

 & lt; The update id="updateKhsj parameter>"; 

The update KHSJ set RZRS=# list [] rzrs# where bmid=# list [] bmid# and datatype=# list [] datatype# and year=# list [] year# and khtime=# list [] khtime#




The mysql database, it always quote syntax errors, I want to ask is ibaits does not support this batch update?

CodePudding user response:

This will have to ask ibaits...

CodePudding user response:

IO mybatis updates, which are frequently used but the database is large, the best batch that update, and you are worried about there is no sure
 & lt; The update id="updateBatch" parameterType="Java. Util. List" & gt; 

The update courseTable

The userName=${item. The userName}

Where id=${item. Id}

CodePudding user response:


The UPDATE KHSJ

RZRS=# {item. RZRS jdbcType=VARCHAR}

WHERE bmid=# {item. Bmid jdbcType=INTEGER} and datatype=# {item. Datatype, jdbcType=VARCHAR} and year=# {item. Year, jdbcType=TIMESTAMP} and khtime=# {item. Khtime jdbcType=TIMESTAMP}





Specific jdbcType you need to adjust themselves depending on the type of table fields!!
  • Related