Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Foreign keys
Multi-column Foreign Keys
Summary

Instruction

Just as we expected, the update failed. Whether we insert new, incorrect information or change existing data to incorrect values, our database will detect it and stop the execution.

Okay, so we now know that the column manager_id in the project table is essentially bulletproof. What about the column id in the employee table? After all, this is where the foreign key points to.

Exercise

Oliver Powell is the manager of one of the projects, and his id is 2. Let's try to change his id to 207 in the employee table.

Stuck? Here's a hint!

Type:

UPDATE employee
SET id = 207
WHERE id = 2;