Foreign key

Applies to: sql

A foreign key stores a value that points to a primary key in another table, modeling relationships between tables.

orders.user_id REFERENCES users(id)

See also: primary-key, join