nerdexam
Oracle

1Z0-007 · Question #133

Examine the data in the EMPLOYEES and DEPARTMENTS tables. You want to retrieve all employees, whether or not they have matching departments in the departments table. Which query would you use?

The correct answer is F. SELECT last_name, department_name. Answer F is correct. This query shows correct syntax to retrieve all employees, whether or not they have matching departments in the department table. Oracle9i extends its compliance with ANSI/ISO by supporting that standard's requirements for outer join syntax and semantics…

Displaying Data from Multiple Tables and Subqueries

Question

Examine the data in the EMPLOYEES and DEPARTMENTS tables. You want to retrieve all employees, whether or not they have matching departments in the departments table. Which query would you use?

Exhibit

1Z0-007 question #133 exhibit

Options

  • ASELECT last_name, department_name
  • BSELECT last_name, department_name
  • CSELECT last_name, department_name
  • DSELECT last_name, department_name
  • ESELECT last_name, department_name
  • FSELECT last_name, department_name

How the community answered

(50 responses)
  • A
    2% (1)
  • B
    8% (4)
  • C
    4% (2)
  • E
    2% (1)
  • F
    84% (42)

Explanation

Answer F is correct. This query shows correct syntax to retrieve all employees, whether or not they have matching departments in the department table. Oracle9i extends its compliance with ANSI/ISO by supporting that standard's requirements for outer join syntax and semantics. Incorrect Answers A: This query uses "+" to create outer join as it was in Oracle8i, but it requires also usage of WHERE clause in SELECT statement. B: The JOIN clause cannot be used with in conjunction with "+": syntax is incorrect. C: The JOIN clause cannot be used with in conjunction with "+": syntax is incorrect. D: This statement requires LEFT OUTER JOIN, not RIGHT OUTER JOIN. E: This query uses incorrect syntax with "+" and ON to create outer join.

Topics

#outer join#LEFT OUTER JOIN#EMPLOYEES table#DEPARTMENTS table

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice