Hi All,
Hope you all are doing good.
In this article, we will know about how to reset identity of table in SQL Server.
By using DBCC CHECKIDENT command we can reset an identity of a table in SQL server
Syntax to reset identity:
DBCC CHECKIDENT ('your_table_name, reseed', RESEED, new_reseed_value)
Example: DBCC CHECKIDENT ('Employee', RESEED, 0)
Syntax to find current identity of column: DBCC CHECKIDENT ('your_table_name, reseed')
Example: DBCC CHECKIDENT ('Employee')
Thanks for reading this article!!
Hope you all are doing good.
In this article, we will know about how to reset identity of table in SQL Server.
By using DBCC CHECKIDENT command we can reset an identity of a table in SQL server
Syntax to reset identity:
DBCC CHECKIDENT ('your_table_name, reseed', RESEED, new_reseed_value)
Example: DBCC CHECKIDENT ('Employee', RESEED, 0)
Syntax to find current identity of column: DBCC CHECKIDENT ('your_table_name, reseed')
Example: DBCC CHECKIDENT ('Employee')
Thanks for reading this article!!
No comments:
Post a Comment