Oracle Database SQL — Question 206

Examine this schema information:

1. EMPLOYEES.DEPARTMENT_ID has a foreign key referencing DEPARTMENTS.DEPARTMENT_ID.
2. EMP_VIEW is based on the EMPLOYEES and DEPARTMENTS tables.
3. EMP_VIEW has columns EMPLOYEE_ID, EMPLOYEE_NAME and DEPARTMENT_NAME.

You must add a new column, MANAGER_ID, from the EMPLOYEES table, to the view, showing each employee’s manager.

Which statement will do this?

Answer options

Correct answer: D

Explanation

The correct answer is D because it creates or replaces the existing view with the new SELECT statement that includes the MANAGER_ID. Options A and C incorrectly attempt to add the column without redefining the view's structure, while B incorrectly uses MODIFY, which is not the correct syntax for adding a column in this context.