McDOUG Question #1A key Oracle11g enhancement forPL/SQL is the function result cache.Which of the following types of datacan be used in the parameter list orreturn clause (but not necessarilyboth) of a function defined using theRESULT_CACHE keyword?
Your Choices?1. Cursor variables2. Nested tables and varrays3. Associative arrays4. Object types5. Large objects (BLOB, CLOB, BFILE)6. Records (user-defined and %ROWTYPE)7. Scalars (numbers, dates, strings, Booleans)
AnswerYou cannot use any of the following datatypes in either the parameter list and RETURN clause of a function that includes the RESULT_CACHE clause: Large objects (BLOB, CLOB, BFILE) Object types Cursor variables If you try to use these anywhere in the function header, you will get this compile error: PLS-00999: implementation restriction (may be temporary) RESULT_CACHE is disallowed on subprograms with IN parameter of (or
Continue You can, on the other hand, return the following types of data (but they may not appear in the parameter list of the function): Associative arrays Nested tables Varrays Records (user-defined and %ROWTYPE)
Restrictions on Result-Cached Functions To be result-cached, a function must meet all of the following criteria: It is not defined in a module that has invokers rights or in an anonymous block. It is not a pipelined table function. It has no OUT or IN OUT parameters.
Restrictions on Result-Cached Functions No IN parameter has one of the following types: – BLOB – CLOB – NCLOB – REF CURSOR – Collection – Object – Record The return type is none of the following: – BLOB – CLOB – NCLOB – REF CURSOR – Object – Record or PL/SQL collection that contains one of the preceding unsupported return types