MCQ Single Best Answer Easy

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

ID: #15453 Data definition language - MySQL 90 views
Question Info
#15453Q 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 MODIFY CONSTRAINT
  • D PRIMARY KEY
Correct Answer: Option D

Explanation

The PRIMARY KEY statement in MySQL is used to add a primary key constraint to a table. It specifies one or more columns that uniquely identify each record in the table.

Share This Question

Challenge a friend or share with your study group.