title: Find Unused ID in Database using C# and SQL
body: <p>I am trying to code a simple database management tool in C#. I am in the process of coding a function to insert a new row into the database, but I have run into a problem. I need to be able to detect which ID numbers are not already taken. I have done some research but haven't found any clear answers.</p>
  
  <pre><code>Example table:
  ID    Name
  ---------------
  1     John
  2     Linda
  4     Mark
  5     Jessica
  </code></pre>
  
  <p>How would I add a function that automatically detects that ID 3 is empty, and places a new entry there?</p>
  
  <p><strong>Edit: My real question is; When I want to insert a new row via C#, how do I handle a column which is auto-increment? An example would be fantastic :)</strong></p>