READ Free Dumps For Oracle- 1z0-007
Question ID 8057 | In which case would you use a FULL OUTER JOIN?
|
Option A | Both tables have NULL values.
|
Option B | You want all unmatched data from one table.
|
Option C | You want all matched data from both tables.
|
Option D | You want all unmatched data from both tables.
|
Option E | One of the tables has more data than the other.
|
Option F | You want all matched and unmatched data from only one table.
|
Correct Answer | D |
Explanation Explanation/Reference: Explanation: Oracle9i also makes it possible for you to easily execute a full outer join, including all records from the tables that would have been displayed if you had used both LEFT OUTER JOIN or RIGTH OUTER JOIN clauses. Incorrect Answers A: You will not use a FULL OUTER JOIN if both tables have NULL values. B: You will not use a FULL OUTER JOIN if you want all unmatched data from one table. Only LEFT OUTER JOIN or RIGTH OUTER JOIN needs to be used. C: You want all unmatched, not matched, data from both tables. E: It is not a criterion to use a FULL OUTER JOIN if one of the tables has more data than the other. F: You want all unmatched, not matched data or a combination of matched and unmatched data, from both tables, not one table. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 109-118 Chapter 3: Advanced Data Selection in Oracle
Question ID 8058 | 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 v