Cannot truncate table because it is being referenced by a FOREIGN KEY constraint?
- by ctrlShiftBryan
Using MSSQL2005, Can I truncate a table with a foreign key constraint if I first truncate the child table(the table with the primary key of the FK relationship)?
I know I can use a DELETE without a where clause and then RESEED the identity OR
Remove the FK, truncate and recreate but I thought as long as you truncate the child table you'll be OK however I'm getting a
"Cannot truncate table 'TableName' because it is being referenced by a FOREIGN KEY constraint."
error.