exam questions

Exam 1z0-071 All Questions

View all questions & answers for the 1z0-071 exam

Exam 1z0-071 topic 1 question 254 discussion

Actual exam question from Oracle's 1z0-071
Question #: 254
Topic #: 1
[All 1z0-071 Questions]

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?

  • A. ALTER VIEW emp_view ADD (employee.manager_id);
  • B. ALTER VIEW emp_view MODIFY (
    SELECT employee_id, employee_name, department_name, manager_id

    FROM employees e, departments d -
    WHERE e.department_id = d.department_id);
  • C. ALTER VIEW emp_view ADD (SELECT manager_id FROM employees);
  • D. CREATE OR REPLACE VIEW emp_view AS
    SELECT employee_id, employee_name, department_name, manager_id

    FROM employees e, departments d -
    WHERE e.department_id = d.department_id;
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
TomZh
5 months, 3 weeks ago
Selected Answer: D
You cannot alter view. You can only alter tables or sequences. SELECT - tables, views, sequences ALTER - tables, sequences all other - tables, views
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago