exam questions

Exam 1z0-148 All Questions

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

Exam 1z0-148 topic 1 question 52 discussion

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

This result cache is enabled for the database instance.
Examine this code for a PL/SQL function:

Which two actions would ensure that the same result will be consistently returned for any session when the same input value is passed to the function?

  • A. Add a parameter, fmt, and change the RETURN statement to: RETURN TO_CHAR (date_hired, fmt);
  • B. Set the RESULT_CACHE_MODE parameter to FORCE.
  • C. Increase the value for the RESULT_CACHE_MAX_SIZE parameter.
  • D. Change the return type of GET_HIRE_DATE to DATE and have each session invoke the TO_CHAR function.
  • E. Set the RESULT_CACHE_MAX_RESULT parameter to 0.
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

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
kahabe59
Highly Voted 5 years, 1 month ago
A and D should be correct answers
upvoted 6 times
...
chrishillinger
Most Recent 2 years, 8 months ago
Selected Answer: AD
AD should be the correct choices, the question deals with implicit conversions and the resulting differences
upvoted 1 times
...
CosminCof
4 years, 6 months ago
I think is B and C.
upvoted 1 times
...
Adela_bg
4 years, 9 months ago
A and D Some possible solutions to this problem are: Change the return type of get_hire_date to DATE and have each session invoke the TO_CHAR function. If a common format is acceptable to all sessions, specify a format mask, removing the dependency on NLS_DATE_FORMAT. For example: TO_CHAR(date_hired, 'mm/dd/yy'); Add a format mask parameter to get_hire_date. For example: CREATE OR REPLACE FUNCTION get_hire_date (emp_id NUMBER, fmt VARCHAR) RETURN VARCHAR RESULT_CACHE IS date_hired DATE; BEGIN SELECT hire_date INTO date_hired FROM HR.EMPLOYEES WHERE EMPLOYEE_ID = emp_id; RETURN TO_CHAR(date_hired, fmt); END; /
upvoted 2 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago