OCP-V13-054

来源:互联网 发布:逆光源网络剧 编辑:程序博客网 时间:2024/05/17 08:51

QUESTION 54
Evaluate the following function code:
CREATE FUNCTION get_dept_avg(dept_id NUMBER) RETURN NUMBER RESULT_CACHE
RELIES_ON
(EMPLOYEES) IS avgsal NUMBER(6);
BEGIN
SELECT AVG(SALARY)INTO avgsal
FROM EMPLOYEES
WHERE DEPARTMENT_ID = dept_id;
RETURN avgsal;
END get_dept_avg;
Which statement is true regarding the above function?
A. The cached result becomes invalid when any structural change is done to the EMPLOYEES table.
B. If the function execution results in an unhandled exception, the exception result is also stored in the
cache.
C. Each time the function is invoked in a different session, the current result in the result cache gets
overwritten.
D. If the function is invoked with a different parameter value, the existing result in the result cache gets
overwritten by the latest value.
Correct Answer: A


评估以下功能代码:
CREATE FUNCTION get_dept_avg(dept_id NUMBER) RETURN NUMBER RESULT_CACHE
RELIES_ON
(EMPLOYEES) IS avgsal NUMBER(6);
BEGIN
SELECT AVG(SALARY)INTO avgsal
FROM EMPLOYEES
WHERE DEPARTMENT_ID = dept_id;
RETURN avgsal;
END get_dept_avg;
以上的功能是正确的?

A.当在员工表中进行任何更改时,缓存的结果将失效。


0 0
原创粉丝点击