Delete precedence with foreign keys in SQL2000

  • This sounds simple, but I'm just going to throw it out there. I've got 3 tables (x100 - but we won't mention those others right now ) that are all related. tables B and C both reference table A with an "ON DELETE CASCADE" foreign key. Table C references table A with a defalut [ON DELETE NO ACTION(restrict)] foreign key. I want to delete all rows from table A and have it clear out tables B and C. Will this work? I thought it would, clearing out table C, then B, then A, but current testing indicates other wise - stopping with a Foreign Key error from B to C. arg.

    B -> A Cascade

    C -> A Cascade

    C -> B Restrict

    Delete from A --> ???

  • *** correction ***

    Table C references table B with a defalut [ON DELETE NO ACTION(restrict)] foreign key.

  • don't ask what a "defalut" FK is.

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

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