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. Open a new query window by clicking on the New Query icon from top left and run following command
Alter table PersonalDetails
Add AutoId int NOT NULL IDENTITY
This adds AutoId column to the PersonalDetails table with auto – increment type so that entering new record into this table automatically increase the value of the AutoId column.
Views: 23175 | Post Order: 19