Which statement is true in this scenario?

The result cache is enabled for the database instance.
Examine the following code for a PL/SQL function:
CREATE OR REPLACE FUNCTION get_hire_date (emp_id NUMBER) RETURN VARCHAR
RESULT_CACHE RELIES_ON (HR.EMPLOYEES)
IS
date_hired DATE;
BEGIN
SELECT hire_date INTO date_hired
FROM HR.EMPLOYEES
WHERE EMPLOYEE_ID = emp_id;
RETURN TO_CHAR(date_hired);
END;
Which statement is true in this scenario?

The result cache is enabled for the database instance.
Examine the following code for a PL/SQL function:
CREATE OR REPLACE FUNCTION get_hire_date (emp_id NUMBER) RETURN VARCHAR
RESULT_CACHE RELIES_ON (HR.EMPLOYEES)
IS
date_hired DATE;
BEGIN
SELECT hire_date INTO date_hired
FROM HR.EMPLOYEES
WHERE EMPLOYEE_ID = emp_id;
RETURN TO_CHAR(date_hired);
END;
Which statement is true in this scenario?

A.
If sessions have different NLS_DATE_FORMAT settings, cached results have different
formats.

B.
The function results are not cached because the query used in the function returns the DATE
data type.

C.
If sessions have different NLS_DATE_FORMAT settings, cached results have same formats
because the function’s return type is VARCHAR.

D.
If a function is executed with same argument value but different NLS_DATE_FORMAT for the
session, the cached result is overwritten with the new function result.



Leave a Reply 1

Your email address will not be published. Required fields are marked *