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 7961

Which two statements are true about WHERE and HAVING clauses? (Choose two)

Option A

A WHERE clause can be used to restrict both rows and groups.

Option B

A WHERE clause can be used to restrict rows only.

Option C

A HAVING clause can be used to restrict both rows and groups.

Option D

A HAVING clause can be used to restrict groups only.

Option E

A WHERE clause CANNOT be used in a query of the query uses a HAVING clause.

Option F

A HAVING clause CANNOT be used in subqueries.

Correct Answer BD
Explanation Explanation/Reference: Explanation : B: WHERE clause cannot be use to restrict groups WHERE clause cannot be use when there is group functions. D: A HAVING clause can only e used to restrict GROUPS. Note: HAVING clause to specify which groups are to be displayed and thus further restrict the groups on the basis of aggregate information. The Oracle server performs the following steps when you use the Having clause 1. rows are grouped 2. the group function is applied to the group 3. the group that match the criteria in the Having clause are displayed. Incorrect Answers : A. Where clause cannot be use to restrict groups C. A HAVING clause can only e used to restrict GROUPS. E. WHERE clause cannot be use when there is group function, instead HAVING is to be use. F. There is no constraint to use HAVING clause in a subqueries. Refer : Introduction to Oracle9i : SQL, Oracle University Student Guide, Aggregating Data using Group Functions, p. 5-20


Question ID 7962

EMPLOYEES and DEPARTMENTS data: EMPLOYEES DEMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_I 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 IT_ADMIN 5000 106 Smith 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 DEPARTMENTS DEPARTMENT_ID DEPARTMENT_NAME 10 Admin 20 Education 30 IT 40 Human Resources On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID managers and refers to the EMPLOYEE_ID. On the DEPARTMENTS table DEPARTMENT_ID is the primary key. Evaluate this UPDATE statement. UPDATE employees SET mgr_id = (SELECT mgr_id FROM employees WHERE dept_id= (SELECT department_id FROM departments WHERE department_name = 'Administration')), Salary = (SELECT salary FROM employees WHERE emp_name = 'Smith') WHERE job_id = 'IT_ADMIN'; What happens when the statement is executed?

Option A

The statement executes successfully, leaves the manager ID as the existing value, and changes the salary to 4000 for the employees with ID 103 and 105.

Option B

The statement executes successfully, changes the manager ID to NULL, and changes the salary to 4000 for the employees with ID 103 and 105.

Option C

The statement executes successfully, changes the manager ID to NULL, and changes the salary to 4000 for the employees with ID 103 and 105.

Option D

The statement fails because there is more than one row matching the employee name Smith.

Option E

The statement fails because there is more than one row matching the IT_ADMIN job ID in the EMPLOYEES table.

Option F

The statement fails because there is no 'Administration' department in the DEPARTMENTS table.

Correct Answer D
Explanation Explanation/Reference: Explanation : '=' is use in the statement and subquery will return more than one row. Employees table has 2 row matching the employee name Smith. The update statement will fail. Incorrect Answers : A. The Update statement will fail no update was done. B. The update statement will fail no update was done. C. The update statement will fail no update was done. E. The update statement will fail but not due to job_it='IT_ADMIN' F. The update statement will fail but not due to department_id='Administration' Refer : Introduction to Oracle9i : SQL, Oracle University Student Guide, Subqueries, p. 6-12

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