title: SQL - Insert Where Not Exists
body: <p>I have what I thought to be a completely trivial query - insert values into a table if a value with a matching ID does not exist:</p>
  
  <pre><code>BEGIN
     INSERT INTO [dbo].[Contact_Categories](Contact_Category_ID, Description)
     VALUES (1, 'Internal')
     WHERE NOT EXISTS( SELECT * FROM [dbo].[Contact_Categories] WHERE Contact_Category_ID = 1)
  END
  </code></pre>
  
  <p>I get an error around the where statement. Why? How do I accomplish my goal?</p>
  
  <p><a href="https://i.stack.imgur.com/dI7y6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dI7y6.png" alt="enter image description here"></a></p>