Oracle
 sql >> Database >  >> RDS >> Oracle

Istruzione Oracle insert if not exist

insert into OPT (email, campaign_id) 
select 'example@sqldat.com',100
from dual
where not exists(select * 
                 from OPT 
                 where (email ='example@sqldat.com' and campaign_id =100));