Wednesday, March 8, 2017

How to reset column identity in SQL server?

Sometimes we delete rows from a table and the identity will not start as expected from one, it would assign a random value. In order to reset the value we have to use the following command.

DBCC CHECKIDENT ('[TableName]', RESEED, 0);
GO

No comments:

Post a Comment

Call a function in child component from parent component in React

Consider the following parent component class Parent extends React.Component { constructor(props) { super(props);         thi...