T-SQL: INSERT for Table w/ Only IDENTITY Column

In the event that you wish to insert a record into a SQL Server table that contains only a single column, and that column is an IDENTITY column, here is the statement:

INSERT INTO dbo.TableName DEFAULT VALUES;

I am primarily saving this so that I don’t have to go searching for it (yet again) the next time I need to do this.

About pyrolupus

Writer, father, teacher, programmer, performer. And I make some mean pancakes, too.
This entry was posted in SQL and tagged , , , . Bookmark the permalink.

Comments are closed.