What are the possible reasons that cause the
INVALID_CURSOR
exception to occur?The 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.The 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 of theOPEN
,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 the PL/SQL executable block, implicit cursor attributes can be used anywhere in the block.
True
False
From the following, identify the two correct statements about the
REF
CURSOR
types:Ref cursors are reference pointers to cursor objects
REF
CURSOR
types can be declared...
Oracle Advanced PL/SQL Developer Professional Guide
By :
Oracle Advanced PL/SQL Developer Professional Guide
By:
Overview of this book
PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation's procedural extension language for SQL and the Oracle relational database. Server-side PL/SQL is stored and compiled in the Oracle Database and runs within the Oracle executable. With this guide Oracle developers can work towards accomplishing Oracle 11g Advanced PL/SQL Professional certification, which is the second milestone for developers working at the Associate level. The Oracle Advanced PL/SQL Developer Professional Guide helps you master advanced PL/SQL concepts. Besides the clear and precise explanation on advanced topics, it also contains example code and demonstrations, which gives a sense of application and usage to readers.The book gives a deep insight that will help transform readers from mid-level programmers to professional database developers. It aims to cover the advanced features of PL/SQL for designing and optimizing PL/SQL code.This book starts with an overview of PL/SQL as the programming database language and outlines the benefits and characteristics of the language. The book then covers the advanced features that include PL/SQL code writing using collections, tuning recommendations using result caching, implementing VPD to enforce row level security, and much more. Apart from programming, the book also dives deep into the usage of the development tool SQL Developer, employing best practices in database environments and safeguarding the vulnerable areas in PL/SQL code to avoid code injection.
Table of Contents (22 chapters)
Oracle Advanced PL/SQL Developer Professional Guide
Credits
Foreword
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Overview of PL/SQL Programming Concepts
Designing PL/SQL Code
Using Collections
Using Advanced Interface Methods
Implementing VPD with Fine Grained Access Control
Working with Large Objects
Using SecureFile LOBs
Compiling and Tuning to Improve Performance
Caching to Improve Performance
Analyzing PL/SQL Code
Profiling and Tracing PL/SQL Code
Safeguarding PL/SQL Code against SQL Injection Attacks
Answers to Practice Questions
Index
Customer Reviews