PgSQL中的on conflict使用

insert into t 
values(1,'name') 
ON CONFLICT(id)
do update set 
name="aaa" ;
 
 
insert into t (a1,b1,c1)
select a2,b2,c2
from t2 
on conflict(a1) 
do update set 
(b1,c1) = (1,2)

你可能感兴趣的:(MySQL,mybatis)