Test Index

Structured Query Language (SQL) Get it on Google PlayDownload on the App Store CBSE Board Videos

© examsnet.com
Question : 10 of 58
Marks: +1, -0
Which of the following is used to add a primary key to a column in a table created in MySQL ?
[CBSE 2026 Compartment]
Solution:  
Concept:
Changing the structure of an existing table (adding a column or constraint) is a DDL task done with ALTER TABLE.
Explanation:
ALTER TABLE STUDENT ADD PRIMARY KEY (RollNo);
INSERT adds rows and UPDATE changes data values (DML). MODIFY is only a clause used inside ALTER TABLE, not a command by itself.
Answer:
Option D (ALTER)
© examsnet.com
Advertisements
Go to Question: