Mysql > insert data records into oracle database tables; mysql > insert data records into oracle database tables

insert into member_order_goods ( id,order_id,product_id,product_name)



select #{item.id}, #{item.order_id}, #{item.product_id} , #{item.product_name} from dual

Points to note:

ParameterType is java.util.list

In fact, the list is a Map<String,Object> element, and each Map is a record

The ArrayList < Map < String, Object > >

Foreach = open=”(” and close=”)”; foreach = open=”(” and close=”)”; Therefore, it is best not to use these two parameters.

3) select ******from dual where dual is not the same as dual

Tips:

Finally, remember that there is a difference between Oracle batch insert and Mysql batch insert. If you follow Mysql batch insert, an error will be reported, indicating that the SQL is not completed correctly.

— By a Java slash-and-burn kid trying to reduce bugs