Which of the following features are not available in SQL Developer?
Query builder
Database export and import
Database backup and recovery functions
Code Subversion repository
For a function to be called from the SQL expression, which of the following conditions should it obey:
A function in the
SELECT
statement should not contain DML statements.The function should return a value.
A function in the
UPDATE
orDELETE
statement should not query the same table.A function called from SQL expressions cannot contain the TCL (
COMMIT
orROLLBACK
) command or the DDL (CREATE
orALTER
) command.
The following query is executed in the
ORADEV
schema:SELECT NAME, referenced_owner, referenced_name FROM all_dependencies WHERE owner = USER AND referenced_type IN ('TABLE', 'VIEW') AND referenced_owner IN ('SYS') ORDER BY owner, NAME, referenced_owner, referenced_name;
Which statement is true about the output of this query?
It displays the schema objects created by the user
ORADEV
which use a table or view owned bySYS
.Exception occurs as user
ORADEV
has insufficient privileges to accessALL_DEPENDENCIES
view.It displays all PL/SQL code objects that reference a table or view directly for all the users in the database.
It displays only those PL/SQL code objects created by the user
OE
that reference a table or view created by the userSYS
.
Which of the following is true about PL/SQL blocks?
Exception is a mandatory section without which an anonymous PL/SQL block fails to compile.
Bind variables cannot be referred inside a PL/SQL block.
The scope and visibility of the variables declared in the declarative section of the block is within the current block only.
The
RAISE_APPLICATION_ERROR
procedure maps a predefined error message to a customized error code.
From the following options, identify the ways of defining exceptions:
Declare a
EXCEPTION
variable and raise it using theRAISE
statement.Use
PRAGMA
EXCEPTION_INIT
to associate a customized exception message to a pre-defined Oracle error number.Declare a
EXCEPTION
variable and use it inRAISE_APPLICATION_ERROR
.Use
RAISE_APPLICATION_ERROR
to create a dynamic exception at any stage within the executable or exception section of a PL/SQL block.
Chose the differences between procedures and functions:
A function must mandatorily return a value, while a procedure may or may not.
A function can be called from SQL queries, while a procedure can never be invoked from SQL.
A function can accept parameters passed by value, while a procedure can accept parameters as passed by reference only.
A standalone function can be overloaded but a procedure cannot.
Examine the values of the cursor attribute for the following query and pick the attribute with the wrong value:
BEGIN … SELECT ENAME, SAL INTO L_ENAME, L_SAL FROM EMPLOYEES WHERE EMPID = 7900; … END;
SQL%ROWCOUNT
=
1
SQL%ISOPEN
=
FALSE
SQL%FOUND
=
FALSE
SQL%NOTFOUND
=
FALSE
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