title: SQL Server: "Cannot insert the value NULL into column" - on identity column
body: <p>I am inserting data into a table with an identity column called <code>unique_id</code>. I am leaving the <code>unique_id</code> column out of the insert, assuming that the value will then be seeded from the identity configuration on the column.</p>
  
  <p><code>Insert</code> statement:</p>
  
  <pre><code>INSERT INTO table_name (column_1, column_2, column_3, processed_dt)
  VALUES ('A', 'B', 'C', GETDATE());
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Cannot insert the value NULL into column 'unique_id', table 'db.dbo.table_name'; column does not allow nulls. INSERT fails.</p>
  </blockquote>
  
  <p>When I double click on the <code>unique_id</code> column in SQL Server Management Studio, I see that the following values are set:</p>
  
  <ul>
  <li>Identity: true</li>
  <li>Identity Seed: 1</li>
  <li>Identity Increment: 1</li>
  </ul>
  
  <p>What other configuration may be wrong to cause the identity seed to not be used automatically?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Based on some of the recommendations I am seeing, I want to add that this schema was converted by our vendor from Oracle into SQL Server. I'm guessing that part of that process must of included converting Oracle <code>Sequences</code> into SQL Server <code>Identity</code> columns. Something being "broken" with the identity column is certainly a possibility.</p>
  
  <p>I'm definitely on the correct database, table, and column. The <code>Identity</code> on this column was not created today, it was created weeks ago.</p>
  
  <p>Is there any configuration the vendor could have put in place that would disable the auto assignment of the seed value and force the developer to "fetch" the next seed value manually?</p>