MCQ Single Best Answer Easy

QWhich DDL statement is used to add a unique constraint to a column in MySQL?

ID: #15462 Data definition language - MySQL 106 views
Question Info
#15462Q ID
EasyDifficulty
Data definition language - MySQLTopic

Choose the Best Option

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

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

Explanation

The UNIQUE KEY statement in MySQL is used to add a unique constraint to a column in a table. It ensures that the values in the column are unique across all rows.

Share This Question

Challenge a friend or share with your study group.