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;
Model answer
What a good answer should say
- UPDATE Student SET Name = 'Rita' WHERE StudentID = 12;
Explanation
Why this works
UPDATE changes existing data. SET specifies the new value, while WHERE identifies the row to change.
Common mistake
No common mistake is linked to this question yet.
