How to reset the identity column in SQL Server?

Options :
  1. DBCC CHECKIDENT (''tableName'', RESEED, 1)
  2. DBCC RESET (''tableName'', RESEED, 1)
  3. RESET IDENTITY(''tableName'', RESEED, 1)
  4. TSQL CHECKIDENT (''tableName'', RESEED, 1)
Answer and Explanation :-

Answer: Option 1


You can reset the identity column using TSQL using below TSQL. DBCC CHECKIDENT ('tableName', RESEED, 1) In above example order is the table name and 1 is the next insert record id

How do you rate this queston?  Very Easy  Easy  Average  Above Average  Tough

Next Question : What is the use of Count_Big() function in SQL Server

Click here for online test on SQL Server


 (Getemail alerts when others member replies)

More available Categories:-

If we wish for our country to have an exponentially brighter future, one of the things we need to change is the popular perception some kids have towards school. School is not a prison, it is not a night club, it is not a fight club school is for learning, learning is the thing that begins the process of separating us from the animals.
-Joshua Neik