0
$\begingroup$

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

$\endgroup$
0
$\begingroup$

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)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.