MCQ Single Best Answer Easy

QWhich DDL statement is used to add a foreign key constraint to a table in MySQL?

ID: #15458 Data definition language - MySQL 84 views
Question Info
#15458Q ID
EasyDifficulty
Data definition language - MySQLTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A ADD CONSTRAINT
  • B CREATE CONSTRAINT
  • C FOREIGN KEY
  • D ALTER TABLE
Correct Answer: Option C

Explanation

The FOREIGN KEY statement in MySQL is used to add a foreign key constraint to a table. It establishes a relationship between two tables based on a column or set of columns.

Share This Question

Challenge a friend or share with your study group.