Home Forums SQL Server 2005 T-SQL (SS2K5) Issue with truncation due to FOREIGN KEY constraint. RE: Issue with truncation due to FOREIGN KEY constraint.

  • SQL Server will not allow you to use the TRUANCATE TABLE command on a table referenced by a foreign key. You have 2 options.

    1. Drop foreign key, truncate table, re-create foreign key.

    2. Leave foreign key alone, use DELETE instead.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden