Hi,
You need to Set IDENTITY (Auto Increment) on the UserId Column, so that it will take the UserId automatically.
There are many options.
1. Delete the UserId Column and run the following script.
ALTER TABLE Users ADD UserId INT IDENTITY (1, 1);
2. Set the Identity Specification to Yes by following below steps.
a. Right Click on the table and select Design
b. Click on UserId Column and see the Column properties below
c. Expant the Identity Specification and Set the Is Identity to Yes.
