Use of NOT EXIST in SQL Server
<p>Someone help me about this code:</p>

<pre><code>IF (NOT EXISTS(SELECT * 
               FROM AgencyEmailAddress 
               WHERE AgencyID = @agencyID 
                AND EmailAddress = @emailAddress
BEGIN 
    INSERT INTO AgencyEmailAddress(AgencyID, EmailAddress) 
    VALUES(@agencyID, @emailAddress) 
END 
</code></pre>

<p>It throws an error</p>

<blockquote>
  <p>Incorrect syntax near the keyword 'BEGIN'.</p>
</blockquote>