nerdexam
Oracle

1Z0-007 · Question #180

Examine the data of the EMPLOYEES table. EMPLOYEES (EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID) Evaluate this SQL statement: SELECT e.employee_id…

The correct answer is B. Option B. This statement lists the ID, name, and salary of the employee, and the ID and name of the employee's manager, for all the employees who have a manager and earn more than 4000 Incorrect Answers A: This output will be provided by different query. C: This output will be provided…

Displaying Data from Multiple Tables and Subqueries

Question

Examine the data of the EMPLOYEES table. EMPLOYEES (EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID) Evaluate this SQL statement:

SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.employee_id "Mgr_id", m.emp_name "Manager" FROM employees e, employees m WHERE e.mgr_id = m.employee_id AND e.salary > 4000; What is its output?

Exhibits

1Z0-007 question #180 exhibit 1
1Z0-007 question #180 exhibit 2

Options

  • AOption A
  • BOption B
  • COption C
  • DOption D

How the community answered

(28 responses)
  • A
    11% (3)
  • B
    82% (23)
  • C
    4% (1)
  • D
    4% (1)

Explanation

This statement lists the ID, name, and salary of the employee, and the ID and name of the employee's manager, for all the employees who have a manager and earn more than 4000 Incorrect Answers A: This output will be provided by different query. C: This output will be provided by different query. D: This output will be provided by different query. E: This SQL query will not produce error, it will show results as in answer

Topics

#self-join#table alias#WHERE clause#result analysis

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice