Home Forums SQL Server 2008 T-SQL (SS2K8) truncate error - foreign key and check constraints RE: truncate error - foreign key and check constraints

  • ananda.murugesan (6/7/2013)


    DELETE statement will be hang due to 76554566 total records.. any suggestion Pls.

    You can try the below steps

    1. DELETE or TRUNCATE the data from all tables that are dependent on this main table

    2. Remove the Foreign Key constraints temporarily on these tables

    3. TRUNCATE the data in the main table now

    4. Add the Foreign Key constraints back on these tables


    Kingston Dhasian

    How to post data/code on a forum to get the best help - Jeff Moden
    http://www.sqlservercentral.com/articles/Best+Practices/61537/