The difference between high and low efficiency batch insertion between advanced oracle and mysql - database classic case (intermediate)

1. Low-efficiency batch insertion:

         Oracle and mysql general way:

 

 

insert into table_name(id,name) values(1,'张三’);
insert into table_name(id,name) values(2,’李四’);

 

2. Efficient batch insertion:

     oracle:

 

insert into table_name(id,name)
select * from (
   select 1,'Zhang San' from dual
   union all
   select 2,'Li Si' from dual
)

 

 

mysql:

insert into table_name(id,name) values(1,'Zhang San'),(2,'Li Si')

 

 

 

 

 

 

 

 

 

 

Donor sharer

          I didn't like programming before, but now I am an IT fan obsessed with programming. I would like to share some things I have sorted out and optimized here, hoping to help IT fans, with joy and sweat, and at the same time I also hope that everyone can support it. Of course, if you have money to support a money field (support Alipay and WeChat donations, join the it data center buckle group), but have no money to support a personal field, with your support, we will be more motivated and do better, thank you Ladies and gentlemen.

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326307240&siteId=291194637