115k views
2 votes
What is the keyword in declaring a FOREIGN KEY constraint?

a) FOREIGN
b) REFERENCES
c) CONSTRAINT
d) KEY

User KingPong
by
7.4k points

1 Answer

5 votes

Final answer:

The keyword for declaring a FOREIGN KEY constraint is 'REFERENCES'. It is used to specify the table and columns that the foreign key is linked to.

Step-by-step explanation:

The keyword in declaring a FOREIGN KEY constraint in SQL is b) REFERENCES. When defining a foreign key, the REFERENCES keyword is used to specify the parent table and the corresponding column(s) that the foreign key will point to. This establishes a link between the two tables, ensuring that the values in the foreign key column(s) correspond to the values in the parent table's primary key or a unique key.

User Kylc
by
8.0k points