Jump to content

Deleting Table Contents


millsy007

Recommended Posts

Just for completeness:

 

Sometimes you will not be able to truncate the table because there are foreign key constraints.

 

In these cases you could either drop and create the table, or delete and reset the seed:

 


  DELETE FROM tableName;
  DBCC CHECKIDENT('tableName', RESEED, 0);
[/Code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.