I have a table that has a single identity column. What is the SQL command for inserting a row into table that only has a single identity column where I want to use the identity column’s auto-generation?
I’ve tried
INSERT INTO TableName
INSERT INTO TableName () VALUES ()
INSERT INTO TableName (Id) VALUES (DEFAULT)
None worked in SQL Server 2008 R2. Id is an identity column.
1 Answer