reference constraint

  • Hi.

    I´m triying to delete data from a table i get a conflict with reference constraint.

    How can i delete data from table 'A' and any other table that share the data ??

    thanks.

  • Usually, delete the data in the referring tables first. Alternatively you could set up your foreign key constraints with cascading deletes. This is considered a dangerous approach, so it's not recommended.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Grant Fritchey (9/25/2009)


    Usually, delete the data in the referring tables first. Alternatively you could set up your foreign key constraints with cascading deletes. This is considered a dangerous approach, so it's not recommended.

    thanks!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply