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

As you can see, the insertion has failed. If we provide a value for column manager_id which cannot be found in column employee.id, the database will know something odd is going on.

How about updating existing columns with incorrect values?

Exercise

Try to UPDATE the project with ID of 1 in the project table. Put an incorrect manager_id value – 100, for instance. What do you think will happen this time?

Stuck? Here's a hint!

For example, type:

UPDATE project
SET manager_id = 100
WHERE id = 1;