The Following Statement RESET the Identity Column in Required table :
DBCC CHECKIDENT (<table_name>, RESEED, <reseed_value>)
With the help of TRUNCATE statement you can reset the value of identity column but TRUNCATE will the reset value to Identity value which is defined at the time of table creation.
NOTE : IDENTITY Column does not Stand for uniqueness unless you don't define identity column as part of Primary key.
Here is the Sample Code :
DBCC CHECKIDENT (<table_name>, RESEED, <reseed_value>)
With the help of TRUNCATE statement you can reset the value of identity column but TRUNCATE will the reset value to Identity value which is defined at the time of table creation.
NOTE : IDENTITY Column does not Stand for uniqueness unless you don't define identity column as part of Primary key.
Here is the Sample Code :
Nice Article buddy :) keep it up. Sharing this....
ReplyDeleteThank you Paras .!!
ReplyDelete