pg 关于不插入重复字段的方法

首先在表的某列加入唯一约束

alter table language_pms add CONSTRAINT language_pms_unique unique(xml); 
insert into language_pms
(SELECT "Key (关键信息)",'<sys:String x:Key="'||"Key (关键信息)"||'">'||"25_한국어 (Korean-韩语)"||'</sys:String>' from "client_3" as t
where t."Key (关键信息)"!='Key (关键信息)' and t."25_한국어 (Korean-韩语)"!='') on conflict(key)  do nothing

  

猜你喜欢

转载自www.cnblogs.com/wangshaowei/p/9258371.html