Tuesday, January 21, 2014

How To: Reset Identity column in SQL Server

The following line resets the Identity value for the Customer table to 0 so that the next record added starts at 1.

DBCC CHECKIDENT('Customer', RESEED, 0)


For MySql
ALTER TABLE tablename AUTO_INCREMENT = 1

No comments:

Post a Comment