READ Free Dumps For Oracle- 1z0-001
Question ID 8100 | The path table contains these columns: ID NUMBER(7) PK COST NUMBER(7,2) PRODUCT_ID NUMBER(7) Evaluate these SQL statements: SELECT ROUND(max(cost),2), ROUND(min(cost),2), round(sum(cost),2), ROUND(AVG(cost),2) FROM part; SELECT product_id, ROUND(max(cost),2), ROUND(min(cost),2), ROUND(sum(cost),2), ROUND(AVG(cost),2) FROM part GROUP BY product_id; How will the results differ?
|
Option A | The results will be same but the display will differ.
|
Option B | The statement1 will only display one row of results, statement2 can display more than one.
|
Option C | Statement1 will display a result for each part, statement2 will display a result for each product.
|
Option D | One of the statements will generate an error.
|
Correct Answer | B |
Explanation Explanation/Reference: Explanation: Answer B is correct because Statement2 uses GROUP BY function to calculate aggregated functions for each PRODUCT_ID while Statement1 returns one row result. Incorrect Answers: A: The results will not be the same. C: Statement1 will not display a result for each part, but only one row. D: Both statements will be successfully completed without errors. Oracle 8, DBA Certification Exam Guide, Jason S. Couchman, p. 58-64 Chapter 5: Advanced Data Selection in Oracle
Question ID 8101 | In which section of a PL/SQL block is a user defined exception waste?
|
Option A | Heading
|
Option B | Executable
|
Option C | Declarative
|
Option D | Exception handling
|
Correct Answer | B |
Explanation Explanation/Reference: Explanation: Answer B is correct because in the executable section of PL/SQL block a user-defined exception waste. Incorrect Answers: A: Heading section of PL/SQL block is used for function, procedure, package naming, not for exceptions. C: Declarative section of PL/SQL block, which is optional, identifies all variables constructs that will be used in the code block. D: Exception handling section of PL/SQL block defines all errors that may occur in the block and specifies how they should be handled. Oracle 8, DBA Certification Exam Guide, Jason S. Couchman, p. 209 Chapter 5: Introducing PL/SQL