标签:
Mysql insert if no exist
由于Mysql没有noexists之类的东西,只能用having 来构造一个false的条件
insert into DRUG_NAME1 (id,name,drug_id) select 7777,‘drugname‘,666 from DRUG_NAME1 t
where t.id=7777 having count(id)=0;
标签:
原文地址:http://www.cnblogs.com/fencer911/p/5026522.html