FOREIGN KEY is a column or multiple columns, which serve to indicate which is the primary key of another table.
The column or columns listed as FOREIGN KEY may only have values that already exist in the primary key of another table.
Example FOREIGN KEY
table "departments" with primary key "dep"
table 'people' with a FOREIGN KEY 'dep', which refers to the primary key 'dep' of the previous table 'departments' and therefore can only have a value which is in the table
FOREIGN KEY definitions in CREATE TABLE for MySQL
FOREIGN KEY definitions in CREATE TABLE to ORACLE, ACCESS, SQLSERVER
If FOREIGN KEY is composed of several columns and want to put a name :
Example with ALTER TABLE FOREIGN KEY
Example multiple FOREIGN KEY (multiple columns) with ALTER TABLE:
To delete a FOREIGN KEY use DROP, but varies according to the data base:
Remove FOREIGN KEY in MySQL
Remove FOREIGN KEY in ORACLE, SQLSERVER and ACCESS