Skip to main contentSkip to solution

Consider the following relation:

STUDENT(RollNumber, SName,SDateofBirth ,GUID)

Which of the SQL Command is correct to update the GUID to 501 for the student having roll no 13?

Solution

✅ Correct Option: 2

The correct syntax is UPDATE table SET column = value WHERE condition;\text{UPDATE table SET column = value WHERE condition;}. Option 2 follows it: the table name comes right after UPDATE, SET assigns the new value to GUID, and the WHERE clause uses the comparison operator = to select the row with RollNumber 13.


Option 1: the WHERE clause has no comparison operator between RollNumber and 13.

Option 3: the SET keyword is missing.

Option 4: UPDATE does not take FROM (that belongs to SELECT and DELETE).

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question