Updated on Kisan Patel
Adding a new column as auto increment to the existing database table is not possible through the SQL Server Management studio (SSMS), so we do it by SQL Script.
First, open a new query window by clicking on the New Query icon from top left and run following command:
Alter table Users Add UserId int NOT NULL IDENTITY]
After executing above query, it will adds UserId column to the Users table with auto – increment type so that entering new record into this table automatically increase the value of the UserId column.