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
Q

PL/SQL records contain one or more components/fields of any (SCALAR) or composite type.

True

False

A

True

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

In explicit cursor operations, the set of rows returned by a multiple-row query is called RECORD SET.

True

False

A

False

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

Always add (EXCEPTION HANDLERS) whenever there is a possibility of an error occurring.

True

False

A

True

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

The exception section begins with the keyword (EXCEPTION)

True

False

29
Q

Always add exception handlers whenever there is a possibility of an error occuring.

True

False

30
Q

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

31
Q

When code does not work as expected, PL/SQL raises an exception handler.

True

False

32
Q

Exception handlers are code that defines the recovery actions to be performed when execution-time errors occur.

True

False

33
Q

The RAISE_APPLICATION_ERROR can be used in executable and exception section.

True

False

34
Q

Pragma declaration is used in declaring non-predefined exceptions.

True

False

35
Q

There are 2 parameters needed in the pragma declaration of an exception.

True

False

36
Q

The RAISE statement can be used to raise either user-defined or predefined exception.

True

False

37
Q

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

A

PRAGMA EXCEPTION_INIT

38
Q

Two methods for raising an exception:

Predefined, Non-predefined

Implicit, Explicit

A

Implicit and Explicit

39
Q

The %ROWTYPE cannot be used to declare a record based on another record.

True

False

40
Q

Types and records are composite structures that can be declared anywhere that scalar variables can be declared.

True

False

41
Q

In explicit cursor operations, the set of rows returned by a multiple-row query is called ________.

Cursor

Active Cursor

Record set

Active set

A

Active Set

42
Q

If you omit the NOWAIT keyword, then the Oracle server waits indefinitely until the rows are available.

True

False

43
Q

TYPE and (RECORDS) are composite structures.

True

False

44
Q

The user-defined exceptions are declared within the declarative section and are raised implicitly.

True

False

45
Q

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

46
Q

You can use the _______ procedure to return user-defined error messages from stored subprograms.

RAISE_APPLICATION_ERROR

SQLCODE

SQLERRM

PRAGRAM EXCEPTION_INIT

A

RAISE_APPLICATION_
ERROR

47
Q

What is the first step in handin non-predefined exception?

Pragram declaration?

Exceptino name declaration

A

Exception name declaration

48
Q

The () symbol is used to enclose the elements of the TYPE structure.

True

False

49
Q

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

50
Q

The NOWAIT keyword is mandatory in the FOR UPDATE clause.

True

False

51
Q

What symbol is used to terminate the TYPE statement?

DECLARE

    TYPE person_dept IS . . . . . . . .

(;)

True

False

52
Q

The FETCH statement positions the cursor pointer at the first row.

True

False

53
Q

The OPEN will populate the cursor’s active set with the result of the SELECT statement in the cursor’s definition?

True

False

54
Q

When an exception is raised, the rest of the execution section of the PL/SQL block is not executed.

True

False

55
Q

An exception hanlder for a particular expression must contain only one statement.

True

False

56
Q

Exception section is mandatory in PL/SQL block.

True

False

57
Q

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

True

False

58
Q

The SQLCODE function returns the numeric value for the error code.

True

False

59
Q

The RAISE_APPLICATION_ERROR can be used in:

Executable and Exception section

Executable section

Declaration and Exception section

Exception section

A

Executable and Exception Section

60
Q

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

A

Declared exception name

61
Q

The declared non-predefined exception is raised _________.

EXPLICITLY

IMPLICITLY

A

IMPLICITLY

62
Q

The ___________ and ___________ are the two types of Oracle Server Errors.

Predefined, Non-predefined

Implicit, Explicit

A

Predefined, Non-predefined

63
Q

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

64
Q

An exception occurs when an error is discovered during the execution of a program that disrupts the normal operation of the program.

True

False

65
Q

In exception section, the WHEN clause if followed by a condition.

True

False

66
Q

Non-predefined errors are raised explicitly.

True

False

67
Q

Names for predefined exceptinos must be declared in the declaration section.

True

False

68
Q

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