Reputation: 773
I am trying to figure out how cascade delete works. I know the general concept but not the specifics of it.
I have 3 tables (a)||---|<(B)>o---||(C)
Table A:
Aid
Tag
Table B:
Aid (f)
Cid (F)
Table C:
Cid
Other
If I set Table B [Aid] to delete cascade would it:
Upvotes: 1
Views: 4328
Reputation: 431
If you have set up table B to delete cascade on the foreign key to table A then if a tag get's deleted the corresponding records in Table B will be deleted. Table B deletions will not affect table A since table A does not have any references or foreign keys into table B.
Upvotes: 5