READ Free Dumps For Oracle- 1z0-007
Question ID 7884 | Which two statements about subqueries are true? (Choose two.) |
Option A | A single row subquery can retrieve data from only one table. |
Option B | A SQL query statement cannot display data from table B that is referred to in its subquery, unless table B is included in the main query's FROM clause. |
Option C | A SQL query statement can display data from table B that is referred to in its subquery, without including table B in its own FROM clause. |
Option D | A single row subquery can retrieve data from more than one table. |
Option E | A single row subquery cannot be used in a condition where the LIKE operator is used for comparison. |
Option F | A multiple-row subquery cannot be used in a condition where the LIKE operator is used for comparison. |
Correct Answer | BD |
Question ID 7885 | 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) EMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_ID 101 Smith 20 120 SA_REP 4000 102 Martin 10 105 CLERK 2500 103 Chris 20 120 IT_ADMIN 4200 104 John 30 108 HR_CLERK 2500 105 Diana 30 108 HR_MGR 5000 106 Bryan 40 110 AD_ASST 3000 108 Jennifer 30 110 HR_DIR 6500 110 Bob 40 EX_DIR 8000 120 Ravi 20 110 SA_DIR 6500 Evaluate this SQL statement: SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, |
Option A | 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? |
Option B | EMP_id EMPLOYEE SALARY Mgr_id Manager ------- ---------- --------- ------------- -------------- 110 Bob 8000 Bob 120 Ravi 6500 110 Ravi 108 Jennifer 6500 110 Jennifer 103 Chris 4200 120 Chris 105 Diana 5000 108 Diana |
Option C | EMP_id EMPLOYEE SALARY Mgr_id Manager ------- ---------- --------- ------------- -------------- 120 Ravi 6500 110 Bob 108 Jennifer 6500 110 Bob 103 Chris 4200 120 Ravi 105 Diana 5000 108 Jennifer |
Option D | EMP_id EMPLOYEE SALARY Mgr_id Manager ------- ---------- --------- ------------- -------------- 110 Bob 8000 120 Ravi 6500 110 Bob 108 Jennifer 6500 110 Bob 103 Chris 4200 120 Ravi 105 Diana 5000 108 Jennifer D EMP_id EMPLOYEE SALARY Mgr_id Manager ------- ---------- --------- ------------- -------------- 110 Bob 8000 110 Bob 120 Ravi 6500 120 Ravi 108 Jennifer 6500 108 Jennifer 103 Chris 4200 103 Chris 105 Diana 5000 105 Dina |
Option E | The SQL statement produces an error. |
Correct Answer | B |