Multiple choice technology databases

How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?

  1. UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'

  2. UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'

  3. MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen

  4. MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

UPDATE table SET column='new' WHERE condition is the correct syntax. SET defines the change, WHERE filters which rows to update. Option B is correct - it uses SET with WHERE clause properly.