exam questions

Exam 1z0-148 All Questions

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

Exam 1z0-148 topic 1 question 2 discussion

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

Examine the code:

Which two subprograms will be created successfully?

  • A. CREATE FUNCTION p4 (y pkg.tab_typ) RETURN pkg.tab_typ IS BEGIN EXECUTE IMMEDIATE SELECT pdt_id, pdt_name FROM TABLE (:b) BULT COLLECT INTO pkg.x USING y; RETURN pkg.x; END p4;
  • B. CREATE PROCEDURE p1 (y IN OUT pkg.tab_typ) IS BEGIN EXECUTE IMMEDIATE SELECT f (:b) FROM DUAL INTO y USING pkg.x; END p1;
  • C. CREATE PROCEDURE p2 (v IN OUT VARCHAR2) IS BEGIN EXECUTE IMMEDIATE SELECT f (:b) FROM DUAL INTO v USING pkg.x; END p2;
  • D. CREATE FUNCTION p3 RETURN pkg. tab_typ IS BEGIN EXECUTE IMMEDIATE SELECT f (:b) FROM DUAL INTO pkg.x; END p3;
  • E. CREATE PROCEDURE p5 (y pkg. rec_typ) IS BEGIN EXECUTE IMMEDIATE SELECT pdt_name FROM TABLE (:b) BULK COLLECT INTO y USING pkg.x;
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

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
chrishillinger
2 years, 9 months ago
Selected Answer: AC
AC is correct B is using the wrong data type for variable y D is missing a return clause E is inserting into an IN variable
upvoted 2 times
...
JustinasSLT
3 years, 10 months ago
A,C are correct but you need to add Quotation marks, like: EXECUTE IMMEDIATE 'SELECT pdt_id, pdt_name FROM TABLE (:b)' BULK COLLECT INTO pkg.x USING y;
upvoted 2 times
...
sudhirdavim
4 years, 5 months ago
AC are the correct anser.
upvoted 1 times
...
Nisha1
5 years, 9 months ago
AC is working without Using Clause
upvoted 1 times
CosminCof
4 years, 6 months ago
AC are the right answers; It wouldnt work if you dont use USING clause because there is a bind variable called ":b"
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 ...