Exam-style question
Try this first
Which statement changes the Name value to 'Rita' for the row whose StudentID is 12?.
- A.UPDATE Student SET Name = 'Rita' WHERE StudentID = 12;
- B.CHANGE Student Name = 'Rita' WHERE StudentID = 12;
- C.INSERT INTO Student SET Name = 'Rita' WHERE StudentID = 12;
- D.SELECT Student SET Name = 'Rita' WHERE StudentID = 12;
Answer and explanation
Concise answer
UPDATE Student SET Name = 'Rita' WHERE StudentID = 12;
Why this is correct
UPDATE changes existing data. SET specifies the new value, while WHERE identifies the row to change.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
