if (select Count(*) from HotelOptions where OptionName='FirmBankCode') =1 then delete from HotelOPtions where OptionName='FirmBankCode' end if; GO if (select count(*) from HotelOPtions where OptionName='FirmBankKod')=0 then insert into HotelOptions values('FirmBankKod','99988877711','Банков код на фирмата',1) end if;