Which of the following is correct syntax for inserting foreign key constraint in a relation?

1
ALTER TABLE table_name ADD FOREIGN KEY(attribute name) REFERENCES referenced_table_name(attribute name)
2
ADD TABLE table_name ADD FOREIGN KEY(attribute name) REFERENCES referenced_table_name(attribute name)
3
ALTER TABLE table_name REFERENCES referenced_table_ name(attribute name) ADD FOREIGN KEY (attribute name)
4
MODIFY TABLE table_name ADD FOREIGN KEY(attribute name) REFERENCES referenced_table_name(attribute name)

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation