FORMATIVE 2 Flashcards

1
Q

Start with the (TYPE) keyword to define a user-defined record structure.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Use the ISOPEN cursor attribute before performing a fetch to test whether the cursor is open.

True or False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The term (TRAPPING) in exceptions is the same as handling any error by including corresponding exception handler.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Error in PL/SQL is known as (EXCEPTION)

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Each exception handler is consists of a (WHEN) clause, which specifies an exception name.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The RAISE keyword is used in user-defined exception for error notification.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The term TRAP in exceptions is the same as handling any error by including corresponding exception handler.

True

False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The (OTHERS) is an optional exception-handling clause that traps any exceptions that have not been explicitly handled.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The OTHERS is mandatory exception-handling clause that traps any exceptions that have not been explicitly handled.

True or False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Non-predeffined errors are raised explicitly

True or False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Non-predefined exceptions has a standard Oracle error number (ORA-#####) and error message, but not a predefined name.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Pragma declaration is used in declaring user-defined exceptions.

True

False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

You can use the __________ procedure to return userr-defined error messages from stored subprograms

EXCEPTION_INIT

RAISE_APPLICATION_ERROR

A

RAISE_APPLICATION_
ERROR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

User-defined exceptions are declared within the declarative section and are raised explicitly.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The oracle error number, at the PRAGMA EXCEPTION_INIT function, starts with _____.

UNDERSCORE

0

1

HYPEN

A

HYPEN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

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

A

PRAGRA EXCEPTION_INIT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

The NO_DATA_FOUND is an example of:

Non-predefined exception

Predefined exception

A

Predefined exception

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

The RAISE statement can be used to raise either ____ or predfined exception.

USER-DEFINED

NON-PREDEFINED

A

USER-DEFINED

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

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

A

Pre-defined, Non-predefined

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Type and record declared in the outer block are visible only in the outer block.

True or False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

The type and the record declared in the outer block are visible within the outer block and the inner block.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

You must include the FOR UPDATE clause in the cursor query so that the rows are locked on (OPEN).

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

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

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
PL/SQL records contain one or more components/fields of any (SCALAR) or composite type. True False
True
26
In explicit cursor operations, the set of rows returned by a multiple-row query is called RECORD SET. True False
False
27
Always add (EXCEPTION HANDLERS) whenever there is a possibility of an error occurring. True False
True
28
The exception section begins with the keyword (EXCEPTION) True False
True
29
Always add exception handlers whenever there is a possibility of an error occuring. True False
True
30
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
31
When code does not work as expected, PL/SQL raises an exception handler. True False
False
32
Exception handlers are code that defines the recovery actions to be performed when execution-time errors occur. True False
True
33
The RAISE_APPLICATION_ERROR can be used in executable and exception section. True False
True
34
Pragma declaration is used in declaring non-predefined exceptions. True False
True
35
There are 2 parameters needed in the pragma declaration of an exception. True False
True
36
The RAISE statement can be used to raise either user-defined or predefined exception. True False
True
37
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
38
Two methods for raising an exception: Predefined, Non-predefined Implicit, Explicit
Implicit and Explicit
39
The %ROWTYPE cannot be used to declare a record based on another record. True False
False
40
Types and records are composite structures that can be declared anywhere that scalar variables can be declared. True False
True
41
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
42
If you omit the NOWAIT keyword, then the Oracle server waits indefinitely until the rows are available. True False
True
43
TYPE and (RECORDS) are composite structures. True False
True
44
The user-defined exceptions are declared within the declarative section and are raised implicitly. True False
False
45
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
46
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
47
What is the first step in handin non-predefined exception? Pragram declaration? Exceptino name declaration
Exception name declaration
48
The () symbol is used to enclose the elements of the TYPE structure. True False
True
49
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
50
The NOWAIT keyword is mandatory in the FOR UPDATE clause. True False
False
51
What symbol is used to terminate the TYPE statement? DECLARE TYPE person_dept IS . . . . . . . . (;) True False
True
52
The FETCH statement positions the cursor pointer at the first row. True False
False
53
The OPEN will populate the cursor's active set with the result of the SELECT statement in the cursor's definition? True False
True
54
When an exception is raised, the rest of the execution section of the PL/SQL block is not executed. True False
True
55
An exception hanlder for a particular expression must contain only one statement. True False
False
56
Exception section is mandatory in PL/SQL block. True False
False
57
The EXECUTE keyword is used in user-defined exception for error notification. True False
False
58
The SQLCODE function returns the numeric value for the error code. True False
True
59
The RAISE_APPLICATION_ERROR can be used in: Executable and Exception section Executable section Declaration and Exception section Exception section
Executable and Exception Section
60
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
61
The declared non-predefined exception is raised _________. EXPLICITLY IMPLICITLY
IMPLICITLY
62
The ___________ and ___________ are the two types of Oracle Server Errors. Predefined, Non-predefined Implicit, Explicit
Predefined, Non-predefined
63
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
64
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
65
In exception section, the WHEN clause if followed by a condition. True False
False
66
Non-predefined errors are raised explicitly. True False
False
67
Names for predefined exceptinos must be declared in the declaration section. True False
False
68
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