Multiple choice

Examine the structure of the EMPLOYEES table:

EMPLOYEE_ID NUMBER Primary Key

FIRST_NAME VARCHAR2 (25)

LAST_NAME VARCHAR2 (25)

HIRE_DATE DATE

Which UPDATE statement is valid?

  1. UPDATE employees SET first_name = 'John' SET last_name='Smith' WHERE employee_id = 180;

  2. UPDATE employees SET first_name = 'John', SET last_name ='Smith' WHERE employee_id = 180;

  3. UPDATE employees SET first_name = 'John' AND last_name ='Smith' WHERE employee_id = 180;

  4. UPDATE employees SET first_name = 'John', last_name ='Smith' WHERE employee_id = 180;

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

Option D is correct because UPDATE statements use comma-separated column assignments in the SET clause. Options A and B incorrectly use multiple SET keywords. Option C incorrectly uses AND instead of a comma - AND is a logical operator for WHERE clauses, not for separating column assignments in SET. The correct syntax is SET column1 = value1, column2 = value2.