Introduction
1. Foreign Keys - Introduction
Foreign keys
Multicolumn foreign keys
Updates and deletes
Revision

Instruction

Hello, good to see you again. Last time, we talked about constraints. Do you remember what they were? We applied them so that our database could keep the data correct.

The constraints we've discussed so far kept data correct in single tables, strictly speaking. This time, we're going to talk about another kind of constraints which deserve a separate course part. These will be constraints which keep data between different tables correct. Such constraints are called foreign keys (or FK for short).

Exercise

Press the Next exercise button to continue the introduction.

Console

Code editor

Result

TableConsole