Skip to content

Tag Archives: sqlserver

You are here:
  1. Home
  2. Entries tagged with "sqlserver"

How to reset Primary Key value of MS SQL Server table?

DatabasesBy kavecanFebruary 1, 2013

Just run following query: DBCC CHECKIDENT(‘YourTableName’, RESEED, 0) This one is often used after truncating table – under usual curcumstances without this command, next record you add will have primary key one higher than the latest added record (even you just truncated table).

© 2026. Kavecan.com. All rights reserved.
Go to Top