A DBA of MySQL wants to add primary key on column ‘Order_No’ of table ‘Orders’. Which of the following solution(s) is/are valid for the above requirement?

(i). mysql> ALTER TABLE Orders DROP PRIMARY KEY;

mysql> ALTER TABLE Orders MODIFY Order_No INT NOT NULL;

mysql> ALTER TABLE Orders ADD PRIMARY KEY ( Order_No);

(ii). mysql> ALTER TABLE Orders DROP PRIMARY KEY;

mysql> ALTER TABLE Orders MODIFY Order_No INT PRIMARY KEY;

(iii). mysql> ALTER TABLE Orders DROP PRIMARY KEY;

mysql> ALTER TABLE Orders MODIFY Order_No INT NOT NULL PRIMARY KEY;

only (i)

(i),(ii) & (iii)

(i) & (iii)

(i) & (ii)

Verified Answer
Correct Option - c

To get all Infosys Certified MySQL Administrator Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in