Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Primary keys
Foreign keys
Updating and deleting with foreign keys
Summary

Instruction

Nice! As you can see, we were able to update the row. And the respective value in project changed as well. What about deleting rows?

Exercise

What happens if we delete an employee? We've returned the good old ID 1 to Amelia Foster because she wasn't really happy about ID 20. Now, try to delete her (id = 1) from the employee table.

Observe how the row for manager_id = 1 in the project is removed.

Stuck? Here's a hint!

Syntax reminder:

DELETE FROM ...
WHERE ...;