Exam 1z0-149 All QuestionsBrowse all questions from this exam
Question 14

Examine this table in the SH schema:

Now, examine this code:

Which two changes are required to ensure that PDT_REPORT executes successfully? (Choose two.)

    Correct Answer: B, C

    To ensure that PDT_REPORT executes successfully, the following two changes are required: The parameter mode for the cursor should be changed to IN mode. This is because cursors in Oracle PL/SQL typically use IN parameters, as they don't modify the parameter value. Hence, in line 2, change IN OUT mode to IN mode. Furthermore, the query inside the cursor should use the same parameter name as defined in the procedure. The parameter name in the query condition should match the parameter passed to the cursor. Therefore, in line 3, replace CUR_PRICE with P_PDT_PRICE in the query condition.

Discussion
abdullah_barhamOptions: AB

Only IN type Parameter can take default value : the Answer Will be A + B

erykjuarezOptions: BF

Only IN type parameter can take default value, parameterized cursors only can execute with IN parameters. Answer B+F its correct --correct create or replace procedure proc1 (p1 in number default null) is cursor c_emp(p_employee_id number default 20000) is select * from employees where employee_id = p_employee_id; begin dbms_output.put_line('error'); open c_emp(100); end;

thranduyl

No change is necessary. I tested.

egznrdOptions: AB

Three options: 1 - no changes; 2 - A,B (most logical); 3 - B, C. If D is selected, then two more changes are needed - A and B.

TheOracleWasTakenOptions: AB

I mean as the other guy says this works without changing anything But since you're not modifying the p_pdt_price just keep it as in. And also not like you're gonna change the cursor parameter so also keep it as in

Goto10

if I run it as follows, then no change is required: declare l_number number := 104; begin pdt_report(l_number); end; /

sorincirnuOptions: BC

Selected Answer: BC