What are the possible reasons that cause the
INVALID_CURSOR
exception to occur?Cursor result set has not been fetched.
The cursor does not have parameters.
The value of the
%ROWCOUNT
attribute has been referenced after closing the cursor.Cursor result set has been fetched into a non matching variable.
Identify the guidelines to be considered when designing cursors in a PL/SQL block:
Explicit cursors must be used irrespective of the number of records returned by the query.
Cursor
FOR
loops must be used as it implicitly takes care ofOPEN
,FETCH
, andCLOSE
stages.Cursor data must be fetched as a record.
Use
ROWNUM
to index the records in the cursor result sets.
While processing DMLs as implicit cursors in a PL/SQL executable block, implicit cursor attributes can be used anywhere in the block.
True.
False.
From the following options, identify the two correct statements about the
REF
CURSOR
type?Ref
cursors are reference pointers to cursor objects.REF
CURSOR
types can be declared in...
You're reading from Advanced Oracle PL/SQL Developer's Guide (Second Edition) - Second Edition
The rest of the page is locked
You have been reading a chapter from
Advanced Oracle PL/SQL Developer's Guide (Second Edition) - Second EditionPublished in: Feb 2016Publisher: ISBN-13: 9781785284809
© 2016 Packt Publishing Limited All Rights Reserved