Which two blocks are valid?

The STUDENTS table exists in your schema.
Examine the DECLARE section of a PL/SQL block:

Which two blocks are valid?
A. BEGIN
OPEN cursor3 FOR SELECT * FROM students; cursor1 :=cursor3;
END;
B. BEGIN
OPEN stcur; cursor1 :=stcur;
END;
C. BEGIN
OPEN cursor1 FOR SELECT * FROM students; stcur :=cursor1;
END;
D. BEGIN
OPEN stcur; cursor3 :=stcur;
END;
E. BEGIN
OPEN cursor1 FOR SELECT * FROM students; cursor2 :=cursor1;
END;

Download Printable PDF. VALID exam to help you PASS.

2 thoughts on “Which two blocks are valid?

  1. declare

    type studentcur_t is ref cursor return emp3%ROWTYPE;
    type teachercur_t is ref cursor;
    cursor1 studentcur_t;
    cursor2 teachercur_t;
    cursor3 sys_refcursor;

    cursor stcur is
    select * from emp3;

    begin
    — E
    open cursor1 for select * from emp3;
    cursor2 := cursor1;
    — D
    open stcur;
    –cursor3 := stcur; not working
    — C
    open cursor1 for select * from emp3;
    –stcur := cursor1; –not working
    — B
    if stcur%isopen then
    close stcur;
    end if;
    open stcur;
    –cursor1 := stcur; –not working
    — A
    open cursor3 for select * from emp3;
    cursor1 := cursor3;

    end;

  2. AE

    declare
    type studentcur_t is ref cursor return students%ROWTYPE;
    type teachercur_t is ref cursor;
    cursor1 studentcur_t;
    cursor2 teachercur_t;
    cursor3 sys_refcursor;

    cursor stcur is select * from students;

Leave a Reply

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


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