To establish a foreign key constraint in a relation, the syntax is: ALTER TABLE table_name ADD FOREIGN KEY(attribute_name) REFERENCES referenced_table_name(attribute_name). The ALTER TABLE statement modifies an existing table. The ADD FOREIGN KEY clause designates a column to link to a primary key in another table. The components of this syntax are:
ALTER TABLE table_name: Designates the table to be modified.ADD FOREIGN KEY(attribute_name): Specifies the addition of a foreign key constraint to the designated column, attribute_name, in the current table.REFERENCES referenced_table_name(attribute_name): Identifies the target table, referenced_table_name, and the specific column within that table, attribute_name, to which the foreign key will point.Correct application of this syntax enforces referential integrity, ensuring consistent data relationships across tables.


On a relation named Loan of a bank: 