Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003
    Posts
    34

    Unanswered: how to temporarily disable on delete cascade from firing but not the constraint

    Hi all

    i would like to know if this is possible

    how to temporarily disable on delete cascade but not the constraint

    i want to delete a row from the primary key table but i dont want the data from the foreign key to be deleted even though there is an on delete cascade set.

    how do i temporarily disable on delete cascade from firing without disabling the constraint


    Rgrds

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: how to temporarily disable on delete cascade from firing but not the constraint

    That doesn't make any sense does it? You want to make a constraint not "fire" (i.e. disable it), but without disabling it...??? Please explain what you are trying to do, i.e. why you need to do this.

  3. #3
    Join Date
    May 2003
    Posts
    34

    on delete

    Sorry

    If i have failed to frame the question correctly in the previous post.

    What i wanted is to prevent the foreign key table data from being deleted when the primary key table data is deleted when on delete cascade is set between the 2 tables.

    but i dont want to drop the constraint


    i jus wanted to know if its possible 2 acheiv that

    i got 1 option on delete set null

    now i currently have on delete cascade set . how du i change it to on delete set null
    without removing the constraint & creating it again


    Rgrds

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: on delete

    OK, I see what you mean. No, I don't believe you can ALTER the ON DELETE clause for a constraint like that. Of course, you could simply update the child table foreign keys to NULL before you delete the parent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •