Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Foreign keys
Multicolumn foreign keys
Updates and deletes
Revision

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.

Ok, so we know that the column manager_id in the table project is bullet-proof. What about the column id in the table employee? After all, this is where the foreign key points to.

Exercise

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

Stuck? Here's a hint!

Type:

UPDATE employee SET id = 207 WHERE id = 2;