Test Index
CBSE Class 12 Computer Science 2026 Paper Compartment
© examsnet.com
Question : 15 of 37
Marks:
+1,
-0
Which of the following is used to add a primary key to a column in a table created in MySQL ?
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
Go to Question: