To generate Primary Key values for a column in SQL SERVER table we have a Property IDENTITY( seed , increment )
It is the value that is stored in the first row loaded into the database.
Is the incremental value that gets added each time a row loaded after the first one.
You must specify both the seed and increment value or none of them.
If none of them is specified, then default is taken as (1,1).
Here is the Script how we can use the Identity Property
Step 1 : Creating a table Customer table with a primary key
create table Customer(custId int Primary Key IDENTITY(1,1),
Step 2: Insert values to the Customer table
insert into Customer values(‘Ravi’)
insert into Customer values(‘david’)
select * from Customer
Reference : Dilip Kumar Jena ( https://sqlexplore.wordpress.com )