2020年12月9日 星期三

SQL 一次insert 多筆

 -- 傳統

 insert into test.customer(pin,first_name,last_name) values(601,"Bush","Kim");

 insert into test.customer(pin,first_name,last_name) values(602,"Grace","Kun");

 insert into test.customer(pin,first_name,last_name) values(603,"Jully","LAin");


-- oracle 

insert all 

into test.customer(pin,first_name,last_name) values(601,"Bush","Kim")

into test.customer(pin,first_name,last_name) values(602,"Grace","Kun")

into test.customer(pin,first_name,last_name) values(603,"Jully","LAin");


-- mysql

insert into customer(pin,first_name,last_name) 

values(601,"Bush","Kim"),

(602,"Grace","Kun"),

(603,"Jully","LAin");

沒有留言: