exam questions

Exam 1z0-148 All Questions

View all questions & answers for the 1z0-148 exam

Exam 1z0-148 topic 1 question 66 discussion

Actual exam question from Oracle's 1z0-148
Question #: 66
Topic #: 1
[All 1z0-148 Questions]

Examine this function body:

Which two headers will allow this function to compile successfully and take advantage of both invokers rights and function result caching?

  • A. CREATE FUNCTION get_hire_date (emp_id NUMBER) RETURN VARCHAR2 RESULT_CACHE RELIES_ON (departments) AUTHID CURRENT_USER IS date_hired DATE;
  • B. CREATE FUNCTION get_hire_date (emp_id NUMBER) RETURN VARCHAR2 RESULT_CACHE AUTHID CURRENT_USER IS date_hired DATE;
  • C. CREATE FUNCTION get_hire_date (emp_id NUMBER) RETURN VARCHAR2 RESULT_CACHE AUTHID DEFINER IS date_hired DATE;
  • D. CREATE FUNCTION get_hire_date (emp_id NUMBER) RETURN VARCHAR2 RESULT_CACHE RELIES_ON (employees) AUTHID CURRENT_USER IS date_hired DATE;
  • E. CREATE FUNCTION get_hire_date (emp_id NUMBER) RETURN VARCHAR2 AUTHID DEFINER IS
Show Suggested Answer Hide Answer
Suggested Answer: DE 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
yurijk
Highly Voted 5 years, 6 months ago
PLS-00999 & invoker-rights is true but in 11g. in 12c this restriction dissapear. Correct answer: B, D (RELIES_ON is deprecated in 12c, but we can still use it)
upvoted 8 times
muradh8
1 year, 7 months ago
Yes, B and D
upvoted 1 times
...
...
chrishillinger
Most Recent 2 years, 11 months ago
Selected Answer: BD
BD is correct - CURRENT_USER and it makes no sense to rely on a table that's not relevant
upvoted 1 times
...
CosminCof
4 years, 9 months ago
yes, B and D
upvoted 4 times
...
olkaolka
4 years, 11 months ago
https://blogs.oracle.com/oraclemagazine/plsql-enhancements AUTHID CURRENT_USER + RESULT_CACHE will lead to err: RESULT_CACHE is disallowed on subprograms in Invoker-Rights modules
upvoted 1 times
olkaolka
4 years, 11 months ago
Sorry, I was wrong. it was in ora11. In ora 12 AUTHID CURRENT_USER + RESULT_CACHE is OK. According to https://education.oracle.com/oracle-database-advanced-pl-sql/pexam_1Z0-148, Exam has been validated against Oracle Database 12c. Correct answer is B,D.
upvoted 1 times
...
...
Adela_bg
5 years, 1 month ago
I think B and D
upvoted 3 times
...
Tinamoran
5 years, 8 months ago
E will not fire until you put "date_hired date;" at the end of statement the right answer are C and E D - will prompt an Error(1,10): PLS-00999: implementation restriction (may be temporary) RESULT_CACHE is disallowed on subprograms in Invoker-Rights modules
upvoted 1 times
Katana19
5 years, 8 months ago
you're wrong !
upvoted 1 times
...
orakell
5 years, 7 months ago
C and E both user definer's rights, not invoker's rights.
upvoted 2 times
orakell
5 years, 7 months ago
use, not user
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...