AllExam Dumps

DUMPS, FREE DUMPS, VCP5 DUMPS| VMWARE DUMPS, VCP DUMPS, VCP4 DUMPS, VCAP DUMPS, VCDX DUMPS, CISCO DUMPS, CCNA, CCNA DUMPS, CCNP DUMPS, CCIE DUMPS, ITIL, EXIN DUMPS,


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
Explanation Explanation/Reference: Explanation: A SQL query statement cannot display data from table B that is referred to in its sub-query, unless table B is included in the main query's FROM clause. And a single row sub-query can retrieve data from more than one table. Incorrect Answers A: A single row sub-query can retrieve data from more than one table. C: A SQL query statement cannot display data from table B that is referred to in its sub-query, unless table B is included in the main query's FROM clause. E: A single row sub-query can be used in a condition where the LIKE operator is used for comparison. F: A multiple-row sub-query can be used in a condition where the LIKE operator is used for comparison. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 144-150 Chapter 4: Subqueries


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
Explanation Explanation/Reference: 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 B. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 118-122 Chapter 3: Advanced Data Selection in Oracle

Send email to admin@getfreedumps for new dumps request!!!