Databases

Foreign key

A column pointing to another table's primary key, which relates the 2 tables.

Example

orders.user_id = 42 says that order belongs to user 42.

Test yourself: Foreign key

SQL databases

A foreign key points to another table's primary key.

Lessons that use it

More databases terms

All terms →

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.