Single Choice Easy

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

ID: #15462 DDL - Data Definition Language 120 views
Question Info
#15462Q ID
EasyDifficulty
DDL - Data Definition LanguageTopic

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

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.