Skip to content

Glossary: SQL Beyond the Basics

Foreign key

Also written: foreign keys, REFERENCES

A column pointing to another table's primary key, such as orders.customer_id. Declared with REFERENCES, it lets the database refuse rows that point to nothing.

Where the book teaches it

Related terms

Primary keyOrphanPRAGMAON DELETE CASCADE