FA2 - Sheet1 (1) Flashcards
(121 cards)
Start with the _____ keyword to define a user-defined record structure.
TYPE
Given:
DECLARE v_emp_record \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_;
What is missing in the declaration section if we want to declare v_emp_record as type record of EMPLOYEES table? __________
EMPLOYEES%ROWTYPE
The OPEN will populate the cursor’s active set with the result of the SELECT statement in the cursor’s definition?
True
False
True
The FETCH statement positions the cursor pointer at the first row.
Group of answer choices
True
False
False
What is missing in the given exception syntax? ____
EXCEPTION
WHEN exception1 [OR exception2 . . .] statement1; statement2;
THEN
Always add ________ whenever there is a possibility of an error occurring.
EXCEPTION HANDLERS
Handle named exceptions whenever possible, instead of using ______ in exception handlers.
OTHERS
Error in PL/SQL is known as ____________.
EXCEPTION
Each ________ is consists of a WHEN clause, which specifies an exception name.
EXCEPTION HANDLER
When an exception is raised, control immediately shifts to the exception section and the appropriate handler in the exception section is executed.
True
False
t
The term TRAP in exceptions is the same as handling any error by including corresponding exception handler.
Group of answer choices
True
False
True
A block always terminates when PL/SQL raises an exception.
Group of answer choices
True
False
True
An exception handler for a particular exception must contain only one statement.
Group of answer choices
True
False
False
The RAISE keyword is used in user-defined exception for error notification.
Group of answer choices
True
False
True
The PRAGMA clause is used in predefined exception to tell the compiler to associate an exception name with a specific Oracle error number.
Group of answer choices
True
False
False
User-defined exceptions are declared within the declarative section and are raised explicitly.
Group of answer choices
True
False
t
Non-predefined errors are raised explicitly.
Group of answer choices
True
False
The RAISE statement can be used to raise either user-defined or non-predefined exception.
Group of answer choices
True
False
The user-defined exceptions are declared within the declarative section and are raised implicitly.
Group of answer choices
True
False
False
What is the first step in handing non-predefined exception?
Group of answer choices
Exception name declaration
Pragma declaration
Exception name declaration
The RAISE statement can be used to raise either ________ or predefined exception.
Group of answer choices
USER-DEFINED
NON-PREDEFINED
USER-DEFINED
The ________ clause is used in non-predefined exception to tell the compiler to associate an exception name with a specific Oracle error
Group of answer choices
PRAGMA EXCEPTION_INIT
SQLERRM
RAISE_APPLICATION_ERROR
SQLCODE
PRAGMA EXCEPTION_INIT
Two methods for raising an exception:
Group of answer choices
Implicit, Explicit
Predefined, Non-predefined
Implicit, Explicit
You can use the ________________ procedure to return user-defined error messages from stored subprograms.
Group of answer choices
RAISE_APPLICATION_ERROR
PRAGMA EXCEPTION_INIT
SQLCODE
SQLERRM
RAISE_APPLICATION_ERROR