Introduction
Foreign keys
Multicolumn foreign keys
Updates and deletes
22. Database behavior with CASCADE - Deleting rows
Revision

Instruction

Nice! As you can see, we were able to update the row this time and the value in the table project changed respectively. How about deleting rows?

Exercise

Now, we want to check what happens if we delete an employee. Ok, we've returned the good old id 2 to Oliver Powell because he wasn't really happy about id 20. Now, try to delete him (id 2) from the table employee.

Stuck? Here's a hint!

Type:

DELETE FROM employee WHERE id = 2;

Console

Code editor

Result

TableConsole