Which of the following is the correct query for removing the primary key constraint?
Which of the following is the correct query for removing the primary key constraint?
Solution
✅ Correct Option: 1
The SQL (MySQL) syntax for removing a primary key is . The ALTER TABLE statement changes the structure of a table, and DROP removes a constraint or column from it.
Option 2: DELETE is a DML command for removing rows, and it cannot be used in ALTER TABLE to remove a constraint.
Option 3: the keyword TABLE is missing, so the statement is invalid.
Option 4: MODIFY changes a column's definition, and it does not remove a primary key.
Related questions:
2026: 24 May Shift 1
2025: 16 May Shift 1
2026: 26 May Shift 1
2026: 21 May Shift 1
2026: 31 May Shift 1