Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    46

    Unanswered: Cascade Delete Question

    I am attempting to clarify how the cascade delete works. For example I have a Parent table and two child tables used for lookup that have the ID_FK = ID_PK from the Parent table.

    tblUsers
    ---------------
    ID_PK
    Fname
    Lname
    ...

    tblUser_Phone
    ----------------
    ID_FK
    Phone
    ...

    tbUser_Email
    ----------------
    ID_FK
    Email
    ...


    If I needed to delete all records from tblUser_Phone would this delete my USER entry from the parent table tblUsers if I have cascade delete enabled?

    Thanks in advance.

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    I believe cascade delete only deletes children records, so the parent table would be safe.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    I believe you are correct. Cascading only travels down the hierarchy, not up.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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