Monday 11 December 2023

Insert record in a table with only an IDENTITY column? SQL Server

 I was making an image gallery with images only. So I have created a table with a single column named ID with identity. I want to create a row with the auto number and create an image with a created auto.  number.

The problem is How to insert a table with only an IDENTITY column. 

This problem is solved by the query given below.

INSERT dbo.TABLE DEFAULT VALUES;

Next Example

No comments:

Post a Comment