How do I auto increment the primary key in a SQL Server database table, I\'ve had a look through the forum but can\'t see how.
auto increment
primary key
SQL Server
You can use the keyword IDENTITY as the data type to the column along with PRIMARY KEY constraint when creating the table. ex:
IDENTITY
PRIMARY KEY
StudentNumber IDENTITY(1,1) PRIMARY KEY
In here the first '1' means the starting value and the second '1' is the incrementing value.