Evaluatethefollowingfunctioncode:CREATEFUNCTIONget_dept_avg(dept_idNUMBER)RETURNNUMBERRESULT_CACHERELIES_ON(EMPLOYEES)ISavgsalNUMBER(6);BEGINSELECTAVG(SALARY)INTOavgsalFROMEMPLOYEESWHEREDEPARTMENT_ID=dept_id;RETURNavgsal;ENDget_dept_avg;Whichstatementistrueregardingtheabovefunction?()A.ThecachedresultbecomesinvalidwhenanystructuralchangeisdonetotheEMPLOYEEStable.B.Ifthefunctionexecutionresultsinanunhandledexception,theexceptionresultisalsostoredinthecache.C.Eachtimethefunctionisinvokedinadifferentsession,thecurrentresultintheresultcachegetsoverwritten.D.Ifthefunctionisinvokedwithadifferentparametervalue,theexistingresultintheresultcache getsoverwrittenbythelatestvalue.

Evaluatethefollowingfunctioncode:CREATEFUNCTIONget_dept_avg(dept_idNUMBER)RETURNNUMBERRESULT_CACHERELIES_ON(EMPLOYEES)ISavgsalNUMBER(6);BEGINSELECTAVG(SALARY)INTOavgsalFROMEMPLOYEESWHEREDEPARTMENT_ID=dept_id;RETURNavgsal;ENDget_dept_avg;Whichstatementistrueregardingtheabovefunction?()

A.ThecachedresultbecomesinvalidwhenanystructuralchangeisdonetotheEMPLOYEEStable.

B.Ifthefunctionexecutionresultsinanunhandledexception,theexceptionresultisalsostoredinthecache.

C.Eachtimethefunctionisinvokedinadifferentsession,thecurrentresultintheresultcachegetsoverwritten.

D.Ifthefunctionisinvokedwithadifferentparametervalue,theexistingresultintheresultcache getsoverwrittenbythelatestvalue.


相关考题:

Evaluate the following function code: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.

Examine the description of the EMPLOYEES table:EMP_ID NUMBER(4) NOT NULLLAST_NAME VARCHAR2(30) NOT NULLFIRST_NAME VARCHAR2(30)DEPT_ID NUMBER(2)JOB_CAT VARCHARD2(30)SALARY NUMBER(8,2)Which statement shows the maximum salary paid in each job category of each department? ()A. SELECT dept_id, job_cat, MAX(salary) FROM employees WHERE salary MAX (salary);B. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id,job_cat;C. SELECT dept_id, job_cat, MAX(salary) FROM employees;D. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id;E. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept _ id job _ cat salary;