-1

How do I alter the column for changing the seed and increment values of a table after truncating the table.

I have created a table named table and inserted few rows into that table then I have truncated that table and want to update the seed and increment values of identity column.

How can I do this?

wonea
  • 4,783
  • 17
  • 86
  • 139
Sohel Ahmed
  • 149
  • 2
  • 11
  • 4
    Possible duplicate of [Reset identity seed after deleting records in SQL Server](https://stackoverflow.com/questions/21824478/reset-identity-seed-after-deleting-records-in-sql-server) – Michał Turczyn Nov 20 '17 at 06:27
  • 1
    @SohelAhmed `TRUNCATE` will automatically reseed the identity column. So you don't have to manually do it. – Jibin Balachandran Nov 20 '17 at 06:28

1 Answers1

1
DBCC CHECKIDENT ('Table', RESEED, 0);
Mike
  • 721
  • 7
  • 13