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 7919

Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER SALARY NUMBER What is the correct syntax for an inline view?

Option A

SELECT a.last_name, a.salary, a.department_id,

Option B

maxsal FROM employees a, (SELECT department_id, max(salary)maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary < b.maxsal;

Option C

SELECT a.last name, a.salary, a.department_id FROM employees a WHERE a.department_id IN (SELECT department_id FROM employees b GROUP BY department_id having salary = (SELECT max(salary) from employees))

Option D

SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE a.salary = (SELECT max(salary) FROM employees b WHERE a.department _ id = b.department _ id);

Option E

SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE (a.department_id, a.salary) IN (SELECT department_id, a.salary) IN (SELECT department_id max(salary) FROM employees b GROUP BY department_id ORDER BY department _ id);

Correct Answer A
Explanation Explanation/Reference: Explanation: This SQL statement shows correct syntax to build inline views. You must enclose the query text for the inline view in parentheses and also give a label for the inline view so that columns in it can be referenced later. In answer A inline view is marked as B. Incorrect Answers B: This SQL statement will fail because it is not correct syntax for inline views. There is no a label for this inline view also. C: This SQL statement will fail because it is not correct syntax for inline views. There is no a label for this inline view also. D: This SQL statement will fail because it is not correct syntax for inline views. There is no a label for this inline view also. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 162-165 Chapter 4: Subqueries


Question ID 7920

Which clause would you use in a SELECT statement to limit the display to those employees whose salary is greater then 5000?

Option A

ORDER BY SALARY > 5000

Option B

GROUP BY SALARY > 5000

Option C

HAVING SALARY > 5000

Option D

WHERE SALARY > 5000

Correct Answer D
Explanation Explanation/Reference: Explanation: You need to use the WHERE clause to limit the display to those employees whose salary is greater then 5000. Incorrect Answers A: The ORDER BY clause will just sort data, but it will not limit them. B: You cannot use the GROUP BY clause with conditions. Oracle error will be generated. C: The HAVING clause may be used only in conjunction with the GROUP BY clause. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 61-67 Chapter 2: Limiting, Sorting, and Manipulating Return Data

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