その特定のコマンドは次のように実行できます:
insert into LeadCustomer (Firstname, Surname, BillingAddress, email)
select
'John', 'Smith',
'6 Brewery close, Buxton, Norfolk', 'example@sqldat.com'
where not exists (
select 1 from leadcustomer where firstname = 'John' and surname = 'Smith'
);
selectステートメントの結果とselectを挿入します その顧客が存在しない場合にのみ行を返します。