title: How to handle duplicates in SQL Server
body: <p>I have a table in SQL Server called <code>Test_Table</code> with two columns: <code>ID</code> and <code>Name</code></p>
  
  <p>The table looks something like this:</p>
  
  <pre><code>ID NAME
  --------   
  1  John
  2  Jane
  </code></pre>
  
  <p>Now I have a stored procedure which inserts records into this.</p>
  
  <pre><code>INSERT INTO Test_Table
  VALUES (@Id,@Name) 
  </code></pre>
  
  <p>And I'm passing this values from my c# code. Now I want to modify this so that the table does not have duplicates. Where should I check this, In the code or the DB? I'm very weak in DB side stuff. So how can I handle duplicates before inserting values in my table</p>