World's most popular travel blog for travel bloggers.

result after applying on delete cascade

, , No Comments
Problem Detail: 

In this table B is foreign key referring to the primary key A with on delete cascade option.What will be the result after deleting (4,3) and how A:1 4 2 9 3 5 B:3 3 4 2 9 4

Asked By : WSS
Answered By : Grisha Weintraub

The result will be an empty table.

The steps are :

  1. delete (4,3)
  2. delete rows with B = 4 --> (2,4), (5,4)
  3. delete rows with B = 2, B = 5 --> (9,2)
  4. delete rows with B = 9 --> (3,9)
  5. delete rows with B = 3 --> (1,3)
Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/14882

3200 people like this

 Download Related Notes/Documents

0 comments:

Post a Comment

Let us know your responses and feedback