exam questions

Exam 1z0-148 All Questions

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

Exam 1z0-148 topic 1 question 46 discussion

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

Examine this block of code used to calculate the price increase for all the productivity by 1% and then by 2%.

What will be the outcome on execution?

  • A. It will give an error because the calculated column in the cursor is not using a column alias in this block.
  • B. It will go into an endless loop because the loop exist condition is missing.
  • C. It will display the price increase by 1% only for all the products.
  • D. It will display the price increase by 1% only for the first product.
  • E. It will give an error because PDT_REC is not declared.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
orakell
Highly Voted 5 years, 6 months ago
A, not B. No exit condition is needed because it's a FOR IN loop.
upvoted 9 times
...
chrishillinger
Most Recent 2 years, 9 months ago
Selected Answer: A
A is the correct answer
upvoted 1 times
...
CosminCof
4 years, 6 months ago
A is right
upvoted 1 times
...
gusa
4 years, 9 months ago
C: show all products set SERVEROUTPUT ON declare inc number := .01; cursor pdt is select proceso as prodname,(precio*inc) aumento from producto; begin for pdt_rec in pdt loop dbms_output.put_line('prod name '||pdt_rec.prodname|| ' price increm ' || pdt_rec.aumento ); inc := inc +.01; end loop; end; prod name VIRTUAL price increm .03 prod name CONCILIACION price increm .01 prod name COBRANZA price increm .02 prod name SOLICITUD DE NOTA DE CREDITO price increm .04
upvoted 1 times
vlad4475
4 years, 7 months ago
You put an alias on the cursor field in your code. That is why your code did not generate an error. And the correct answer is "A" because alias is needed.
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 ...