10 the value of 100 is passed to the pprice parameter

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: a one-time-only procedure which is executed when the package is first referenced and sets the public variable discount_rate = .10. The value of 100 is passed to the p_price parameter and this is multipled by the discount_rate resulting in a value of 'Discounted 10' is displayed by the DBMS_OUTPUT.PUT_LINE. Incorrect Answers B, C, D & E are incorrect QUESTION 102: Which two statements about functions are true? (Choose two.) A. A function must have a return statement in its body to execute successfully B. Client-side functions can be used in SOL statements C. A stored function that is called from a SOL statement can return a value of any PL/SOL variable data type D. From SOL*Plus, a function can be executed by giving the command EXECUTE functionname; E. A stored function increases efficiency of queries by performing functions on the server rather than in the application Answer: A, E Explanation: There should be a RETURN statement in the function body. If the RETURN statement in the executable section is omitted, the function will successfully compile but the following error will be generated at run time: ORA-06503: PL/SQL: Function returned without value This is because the function does not return any value to the calling block. Actualtests.com - The Power of Knowing 1Z0-147 E. User-defined functions increase the efficiency of queries by applying the functions in the query itself. This improves performance because the data will be filtered on the server as opposed to the client which will reduce network traffic. Incorrect Answers B. Functions must be stored on the server to be used in a SQL Statement. C. Functions called from SQL expressions should return the data type that is compatible with SQL. PL\SQL Data Types such as BOOLEAN, RECORD, or TABLE data types are not supported by SQL. D. Functions are not called like procedures. You cannot use EXECUTE to invoke a function unless you have a variable to hold the returning value. QUESTION 103: Examine this code CREATE OR REPLACE PROCEDURE load bfile (p_flle_loc IN VARCHAR2) IS V_file BFILE; v_filename VARCHAR2(16); CURSOR emp_cursor IS SELEC...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online