Introduction
Foreign keys
8. Inserting incorrect data with foreign keys
Multicolumn foreign keys
Updates and deletes
Revision

Instruction

Good. Now that we have the table with a foreign key, let's find out how it works.

Exercise

Try to INSERT a new project into the table project with a manager_id which will be incorrect. Do you think this will succeed?

Stuck? Here's a hint!

For example, type:

INSERT INTO project 
VALUES (6, 'Valentine''s Day', 'A project to send gifts to all of our employees.', 15);

Console

Code editor

Result

TableConsole