Identity column is not rollback


when create table that time identity is 1

After Insert two records the identity is increase 2 then rollback the insert statement identity i snot rollback

Identity column is not rollback

create table sample
id int identity(1,1),
name varchar(100)

select IDENT_CURRENT(‘sample’)
–Here Identity as 1

begin tran
insert into sample(name)
select ‘udhaya’ union
select ‘ganesh’


–Here Identity as 2


Author: tdmsql

I am a PL-Sql Developer. I am searching some sites sql studies but its bored. i like create studies note my own way. so that i created this site.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s