1.

How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table?(a) UPDATE Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’(b) MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’(c) MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’(d) UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’The question was asked in class test.I need to ask this question from Basic SQL in portion Laying the Foundation of SQL Server

Answer»

Correct OPTION is (d) UPDATE Persons SET LASTNAME=’Nilsen’ WHERE LastName=’Hansen’

To elaborate: In its simplest form, the syntax for the UPDATE statement when UPDATING one table is:UPDATE table SET column1 = expression1,column2 = EXPRESSION2,… WHERE conditions.



Discussion

No Comment Found

Related InterviewSolutions