Default value of identity is identity (1,1)
The seed represents the starting value of an ID and the default value of seed is 1.
Increment: It will represent the incremental value of the ID and the default value of increment is 1.
Example
- Create table student(Id int Primary key Identity ,Name varchar(50),City varchar(50),TotalNumer int)
- insert into student(Name,City,TotalNumer) values('A','Delhi',120)
- insert into student(Name,City,TotalNumer) values('B','Noida',110)
- insert into student(Name,City,TotalNumer) values('C','Gurgaon',125)
- select * from student
Check the table, ID value is increased automatically.

Example
- create table tec(Id int identity(10,5),Deptname varchar(50))
- insert tec values('Dot Net')
- insert tec values('SQL')
- select * from tec
Id value starts by 10 and increases by 5.
Note
If we want to insert the values into an identity column explicitly then we should follow the syntax.
Set identity_insert <Table name> off/on
Off-It is a default connection; we cannot insert a value into an identity column explicitly.
On-we can insert the values into an identity column explicitly.

Join the conversation! Your thoughts help the community grow.