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 a 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 a SQL expression cannot contain TCL (
COMMIT
orROLLBACK
) commands or DDL (CREATE
orALTER
) commands.
The following query is executed in the SCOTT 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
, that use a table or view owned bySYS
.An exception occurs as user
SCOTT
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 are 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 an
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 an
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.
Choose 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 a SQL query, while a procedure can never be invoked from SQL.
A function can accept parameters passed by a value, while a procedure can accept parameters 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
Advanced Oracle PL/SQL Developer's Guide (Second Edition) - Second Edition
By :
Advanced Oracle PL/SQL Developer's Guide (Second Edition) - Second Edition
By:
Overview of this book
Oracle Database is one of the most popular databases and allows users to make efficient use of their resources and to enhance service levels while reducing the IT costs incurred. Oracle Database is sometimes compared with Microsoft SQL Server, however, Oracle Database clearly supersedes SQL server in terms of high availability and addressing planned and unplanned downtime. Oracle PL/SQL provides a rich platform for application developers to code and build scalable database applications and introduces multiple new features and enhancements to improve development experience.
Advanced Oracle PL/SQL Developer's Guide, Second Edition is a handy technical reference for seasoned professionals in the database development space. This book starts with a refresher of fundamental concepts of PL/SQL, such as anonymous block, subprograms, and exceptions, and prepares you for the upcoming advanced concepts. The next chapter introduces you to the new features of Oracle Database 12c, not limited to PL/SQL. In this chapter, you will understand some of the most talked about features such as Multitenant and Database In-Memory. Moving forward, each chapter introduces advanced concepts with the help of demonstrations, and provides you with the latest update from Oracle Database 12c context. This helps you to visualize the pre- and post-applications of a feature over the database releases. By the end of this book, you will have become an expert in PL/SQL programming and will be able to implement advanced concepts of PL/SQL for efficient management of Oracle Database.
Table of Contents (19 chapters)
Advanced Oracle PL/SQL Developer's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Overview of PL/SQL Programming Concepts
Oracle 12c SQL and PL/SQL New Features
Designing PL/SQL Code
Using Collections
Using Advanced Interface Methods
Virtual Private Database
Oracle SecureFiles
Tuning the PL/SQL Code
Result Cache
Analyzing, Profiling, and Tracing PL/SQL Code
Safeguarding PL/SQL Code against SQL injection
Working with Oracle SQL Developer
Index
Customer Reviews