Mybatis foreach batch inserting data: introduction to the difference between Oracle and MySQL
•
Java
Let's introduce the differences between Oracle and MySQL:
• the main difference lies in the setting of separator attribute in foreach tag:
• when the separator is set to "," split, the final splicing code form is: insert into table_ name (a,b,c) values (v1,v2,v3),(v4,v5,v6),...
• when the separator is set to "union all", the final splicing code form is: insert into table_ name (a,v3) union all (v4,v6) union all...
• see example code for details:
Oracle:
MysqL:
summary
The above is the mybatis foreach batch insert data introduced by Xiaobian to you: the difference between Oracle and MYSQL, I hope it will help you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time!
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码