Thursday, April 25, 2013

Cascade delete

In Following Image you can see 2  different result set 
  1. result set 1 is before Delete. [Before delete Query]
  2. result set 2 is after Delete. [After delete Query]


When you perform Delete operation on dept [parent] table it delete its own table and also delete child table (EMP) table's record which are connected to it.

If we Don't Give  on DELETE CASCADE then it will not allow you to delete this parent table records.

No comments:

Post a Comment