1

So say I delete catID from table A and table B has the same foreign key value? It's hard to explain so I'll try and show you with the two images below:

items table

This catID is referencing a category from the category table

Is it possible to delete the catID from the above table (items) when I delete on cascade a value from the below table (categories):

Categories table:

enter image description here

So say I ran delete from categories where catID = 1 - This will delete both rows from both tables? So essentially it would delete the whole iID instead of just the catID value?

Is it possible to have it delete only the value from the catID column in the items table?

If I'm not making any sense, please let me know? As I'm finding it kind of hard to explain!!

0

0

Browse other questions tagged or ask your own question.