QuestionQ87
VerifiedManipulating DataEMPLOYEES and DEPARTMENTS data:
EMPLOYEES

DEPARTMENTS

In the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the manager ID and refers to EMPLOYEE_ID.
In the DEPARTMENTS table, DEPARTMENT_ID is the primary key.
Evaluate this UPDATE statement.
UPDATE employees
SET mgr_id =
(SELECT mgr_id
FROM employees
WHERE dept_id =
(SELECT department_id
FROM departments
WHERE department_name = 'Administration')),
salary =
(SELECT salary
FROM employees
WHERE emp_name = 'Smith')
WHERE job_id = 'IT_ADMIN';
What occurs when the statement is executed?
Community Discussion