1Z0-007 · Question #152
Examine the structure of the EMPLOYEES and DEPARTMENTS tables: Evaluate this SQL statement: SELECT employee_id, e.department_id, department_name, Salary FROM employees e, departments d WHERE…
The correct answer is C. SELECT employee_id, d.department_id, department_name. This query shows correct JOIN ON clause syntax and provides equivalent to the above SQL Incorrect Answers A: This statement will show data only for the EMPLOYEES table with records that have department ID from DEPARTMENTS table, not join result of two tables. B: NATURAL join…
Question
Examine the structure of the EMPLOYEES and DEPARTMENTS tables:
Evaluate this SQL statement:
SELECT employee_id, e.department_id, department_name, Salary FROM employees e, departments d WHERE e.department_id = d.department_id; Which SQL statement is equivalent to the above SQL statement?
Exhibit
Options
- ASELECT employee_id, department_id, department_name, Salary
- BSELECT employee_id, department_id, department_name, Salary
- CSELECT employee_id, d.department_id, department_name,
- DSELECT employee_id, department_id, department_name,
How the community answered
(37 responses)- A16% (6)
- B5% (2)
- C76% (28)
- D3% (1)
Explanation
This query shows correct JOIN ON clause syntax and provides equivalent to the above SQL Incorrect Answers A: This statement will show data only for the EMPLOYEES table with records that have department ID from DEPARTMENTS table, not join result of two tables. B: NATURAL join selects rows from the tables that have equal values in all matched columns (same column names). If the columns having the same names have different datatypes, an error D: There is incorrect usage of JOIN clause with USING keyword.
Topics
Community Discussion
No community discussion yet for this question.
