trucate resets identity 1 code example
Example 1: reset identity column in sql server
DBCC CHECKIDENT ('YourTableName', RESEED, 1)
Example 2: primary key reset in SQL database
DBCC CHECKIDENT('TableName',Reseed,0)
DBCC CHECKIDENT ('YourTableName', RESEED, 1)
DBCC CHECKIDENT('TableName',Reseed,0)