Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Foreign keys
Multicolumn foreign keys
Updates and deletes
22. Database behavior with CASCADE - Deleting rows


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?


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!


DELETE FROM employee
WHERE id = 2;