Thursday, March 8, 2012

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.I believe cascade delete only deletes children records, so the parent table would be safe.|||I believe you are correct. Cascading only travels down the hierarchy, not up.

No comments:

Post a Comment