Which two changes, when separately applied, would prevent these errors from occurring?

Examine this code:

The anonymous block fails this error stack:

Which two changes, when separately applied, would prevent these errors from occurring?
A. Define v2 as employees%ROWTYPE.
B. Initialize v1 and v2 with appropriate constructor functions.
C. Define v2 as pkg. rec.
D. Nothing because using the function TABLE (V1) is prohibited.
E. Define v1 as employees%ROWTYPE.

Download Printable PDF. VALID exam to help you PASS.

5 thoughts on “Which two changes, when separately applied, would prevent these errors from occurring?

  1. AC

    create or replace package pkg as
    type rec is record (f1 number, f2 varchar2(20));
    type mytab is table of rec index by PLS_INTEGER;
    end pkg;
    /

    declare
    v1 pkg.mytab;
    –v2 employees%ROWTYPE; –a
    v2 pkg.rec; — c
    c1 sys_refcursor;
    begin
    for i in 100..200 loop
    select employee_id, last_name into v1(i)
    from employees where employee_id = i;
    end loop;
    open c1 for select * from table(v1);
    fetch c1 into v2;
    close c1;
    end;
    /

    1
    2

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.