there are 4 types of delete Action:
Say we have 2 tables A and B and both tables are having a relation 1:1 or 1:n;
a)None:
if we delete table A then table B will not get deleted.
cascade:
b) if we delete table A then table B will be deleted.
restricted:
If we try to delete table A it won't get deleted until there is a data in the table B which is related to Table A
cascade+rescrited:
say there is one more table C which is cascade to table A
so it is now:
table C--->cascade>>>tableA------rescrited----->tableB
then if we delete the data from c the respective data in table a and table b will deleted.
Say we have 2 tables A and B and both tables are having a relation 1:1 or 1:n;
a)None:
if we delete table A then table B will not get deleted.
cascade:
b) if we delete table A then table B will be deleted.
restricted:
If we try to delete table A it won't get deleted until there is a data in the table B which is related to Table A
cascade+rescrited:
say there is one more table C which is cascade to table A
so it is now:
table C--->cascade>>>tableA------rescrited----->tableB
then if we delete the data from c the respective data in table a and table b will deleted.
No comments:
Post a Comment