FORMATIVE 2 Flashcards
Start with the (TYPE) keyword to define a user-defined record structure.
True or False
True
Use the ISOPEN cursor attribute before performing a fetch to test whether the cursor is open.
True or False
False
The term (TRAPPING) in exceptions is the same as handling any error by including corresponding exception handler.
True or False
True
Error in PL/SQL is known as (EXCEPTION)
True or False
True
When an exception is raised, control immediately shifts to the (EXCEPTION SECTION) and the appropriate handler in the exception section is executed.
True or False
True
Each exception handler is consists of a (WHEN) clause, which specifies an exception name.
True or False
True
The RAISE keyword is used in user-defined exception for error notification.
True or False
True
The term TRAP in exceptions is the same as handling any error by including corresponding exception handler.
True
False
True
The (OTHERS) is an optional exception-handling clause that traps any exceptions that have not been explicitly handled.
True or False
True
The OTHERS is mandatory exception-handling clause that traps any exceptions that have not been explicitly handled.
True or False
False
Non-predeffined errors are raised explicitly
True or False
False
Non-predefined exceptions has a standard Oracle error number (ORA-#####) and error message, but not a predefined name.
True or False
True
Pragma declaration is used in declaring user-defined exceptions.
True
False
False
You can use the __________ procedure to return userr-defined error messages from stored subprograms
EXCEPTION_INIT
RAISE_APPLICATION_ERROR
RAISE_APPLICATION_
ERROR
User-defined exceptions are declared within the declarative section and are raised explicitly.
True or False
True
The oracle error number, at the PRAGMA EXCEPTION_INIT function, starts with _____.
UNDERSCORE
0
1
HYPEN
HYPEN
The _____ is used in non-predefined exception to tell the compiler to associate an exception name with a specific Oracle error.
PRAGMA EXCEPTION INIT
EXCEPTION_INIT
EXCEPTION INIT
PRAGMA EXCEPTION_INIT
PRAGRA EXCEPTION_INIT
The NO_DATA_FOUND is an example of:
Non-predefined exception
Predefined exception
Predefined exception
The RAISE statement can be used to raise either ____ or predfined exception.
USER-DEFINED
NON-PREDEFINED
USER-DEFINED
What are/is the type of exception can be raised using the RAISE statement?
Pre-defined, Non-predefined
User-defined
Pre-defined, User-defined
Non-predefined, User-defined
NON-PREDEFINED
Pre-defined, Non-predefined
Type and record declared in the outer block are visible only in the outer block.
True or False
False
The type and the record declared in the outer block are visible within the outer block and the inner block.
True or False
True
You must include the FOR UPDATE clause in the cursor query so that the rows are locked on (OPEN).
True or False
True
PL/SQL record is a (COMPOSITE) data type, you can refer to the whole record by its name and/or to individual fields by their names.
True
False
True
PL/SQL records contain one or more components/fields of any (SCALAR) or composite type.
True
False
True
In explicit cursor operations, the set of rows returned by a multiple-row query is called RECORD SET.
True
False
False
Always add (EXCEPTION HANDLERS) whenever there is a possibility of an error occurring.
True
False
True
The exception section begins with the keyword (EXCEPTION)
True
False
True
Always add exception handlers whenever there is a possibility of an error occuring.
True
False
True
The following statements are examples of exception handler.
Entering an expiration date that has passed
Selecting more than one row into a single variable
Receiving “no rows returned” from a select statement
True
False
True
When code does not work as expected, PL/SQL raises an exception handler.
True
False
False
Exception handlers are code that defines the recovery actions to be performed when execution-time errors occur.
True
False
True
The RAISE_APPLICATION_ERROR can be used in executable and exception section.
True
False
True
Pragma declaration is used in declaring non-predefined exceptions.
True
False
True
There are 2 parameters needed in the pragma declaration of an exception.
True
False
True
The RAISE statement can be used to raise either user-defined or predefined exception.
True
False
True
The ________ clause is used in user-defined exception to tell the compiler to associate an exception name with a specific Oracle error
PRAGMA EXCEPTION_INIT
Not in the options
SQLCODE, SQLERRM
RAISE_APPLICATION_ERROR
PRAGMA EXCEPTION_INIT
Two methods for raising an exception:
Predefined, Non-predefined
Implicit, Explicit
Implicit and Explicit
The %ROWTYPE cannot be used to declare a record based on another record.
True
False
False
Types and records are composite structures that can be declared anywhere that scalar variables can be declared.
True
False
True
In explicit cursor operations, the set of rows returned by a multiple-row query is called ________.
Cursor
Active Cursor
Record set
Active set
Active Set
If you omit the NOWAIT keyword, then the Oracle server waits indefinitely until the rows are available.
True
False
True
TYPE and (RECORDS) are composite structures.
True
False
True
The user-defined exceptions are declared within the declarative section and are raised implicitly.
True
False
False
The PRAGMA clause is used in predefined exception to tell the compiler to associate an exception name with a specific Oracle error number.
True
False
False
You can use the _______ procedure to return user-defined error messages from stored subprograms.
RAISE_APPLICATION_ERROR
SQLCODE
SQLERRM
PRAGRAM EXCEPTION_INIT
RAISE_APPLICATION_
ERROR
What is the first step in handin non-predefined exception?
Pragram declaration?
Exceptino name declaration
Exception name declaration
The () symbol is used to enclose the elements of the TYPE structure.
True
False
True
The given syntax in declaring a user-define record is incorrect.
TYPE type_name IS RECORD
(field_declaration[,field_declaration]…);
identifier type_name ;
True
False
False
The NOWAIT keyword is mandatory in the FOR UPDATE clause.
True
False
False
What symbol is used to terminate the TYPE statement?
DECLARE
TYPE person_dept IS . . . . . . . .
(;)
True
False
True
The FETCH statement positions the cursor pointer at the first row.
True
False
False
The OPEN will populate the cursor’s active set with the result of the SELECT statement in the cursor’s definition?
True
False
True
When an exception is raised, the rest of the execution section of the PL/SQL block is not executed.
True
False
True
An exception hanlder for a particular expression must contain only one statement.
True
False
False
Exception section is mandatory in PL/SQL block.
True
False
False
The EXECUTE keyword is used in user-defined exception for error notification.
True
False
False
The SQLCODE function returns the numeric value for the error code.
True
False
True
The RAISE_APPLICATION_ERROR can be used in:
Executable and Exception section
Executable section
Declaration and Exception section
Exception section
Executable and Exception Section
In non-predefined exception, you must reference the ________ within a WHEN clause in the exception-handling section.
All the options are possible
Oracle associated error#
Exception name
Declared exception name
Declared exception name
The declared non-predefined exception is raised _________.
EXPLICITLY
IMPLICITLY
IMPLICITLY
The ___________ and ___________ are the two types of Oracle Server Errors.
Predefined, Non-predefined
Implicit, Explicit
Predefined, Non-predefined
What keyword is missing in the given syntax of user-define record? (RECORD)
TYPE type_name IS
(field_declaration[,field_declaration]…);
identifier typename ;
True
False
True
An exception occurs when an error is discovered during the execution of a program that disrupts the normal operation of the program.
True
False
True
In exception section, the WHEN clause if followed by a condition.
True
False
False
Non-predefined errors are raised explicitly.
True
False
False
Names for predefined exceptinos must be declared in the declaration section.
True
False
False
When we declare a cursor FOR UPDATE, each row is locked as we open the cursor and prevent other users from reading the rows.
True
False
False