I have a SQL table where a column (the PK) is an IDENTITY COLUMN: IDENTITY=TRUE, IDENTITY SEED = 1 and IDENTITY INCREMENT=1
It is my understanding that this column should auto increment but I must be doing something really basic wrong.
If I specify a value for the column (which I know is wrong) I get:
Msg 544, Level 16, State 1, Line 112
Cannot insert explicit value for identity column in table 'table_name' when IDENTITY_INSERT is set to OFF.
OK, so I don't specify the column (or value) at all and I get this:
Msg 515, Level 16, State 2, Line 112
Cannot insert the value NULL into column 'column_name', table 'table_name'; column does not allow nulls. INSERT fails.
I SHOULD know the answer to this, but I want the column to auto increment.
What am I doing wrong?