PL SQL Interview Questions - Set 8

1)   Which internal exception is raised when a program references a nested table or varray element using an index number larger than the number of elements in the collection.

a. NO_DATA_FOUND
b. COLLECTION_IS_NULL
c. SUBSCRIPT_OUTSIDE_LIMIT
d. SUBSCRIPT_BEYOND_COUNT
Answer  Explanation 

ANSWER: SUBSCRIPT_BEYOND_COUNT

Explanation:
No explanation is available for this question!


2)   A package cursor is a cursor which you declare in the package specification without an SQL statement.

a. Yes
b. No
Answer  Explanation 

ANSWER: Yes

Explanation:
No explanation is available for this question!


3)   In which of the following, do you specify the same parameters in the same order as they are declared in the procedure?

a. Positional notation
b. Named notation
c. Mixed notation
d. All mentioned above
Answer  Explanation 

ANSWER: Positional notation

Explanation:
No explanation is available for this question!


4)   In which mode parameter lets you pass values to the subprogram being called? It cannot be assigned a value.

a. Using the IN mode
b. Using the OUT mode
c. Both A & B
d. None of the above
Answer  Explanation 

ANSWER: Using the IN mode

Explanation:
No explanation is available for this question!


5)   To call a subprogram directly, users must have the EXECUTE privilege on that subprogram. By granting the privilege, you allow a user to -

a. Call the subprogram directly
b. Compile functions and procedures that call the subprogram
c. Both A & B
d. None of the above
Answer  Explanation 

ANSWER: Both A & B

Explanation:
No explanation is available for this question!


6)   Which is a database object that groups logically related PL/SQL types, objects and subprograms?

a. Package
b. Module
c. Body
d. Name
Answer  Explanation 

ANSWER: Package

Explanation:
No explanation is available for this question!


7)   Only EXISTS can be applied to automatically null collections. If you apply another method to such collections, PL/SQL raises COLLECTION_IS_NULL.

a. Yes
b. No
Answer  Explanation 

ANSWER: Yes

Explanation:
No explanation is available for this question!


8)   Which collection exception is raised when a subscript designates an element that was deleted, or a nonexistent element of an associative array?

a. NO_DATA_FOUND
b. COLLECTION_IS_NULL
c. SUBSCRIPT_BEYOND_COUNT
d. SUBSCRIPT_OUTSIDE_LIMIT
Answer  Explanation 

ANSWER: NO_DATA_FOUND

Explanation:
No explanation is available for this question!


9)   Which collection exception is raised when a subscript exceeds the number of elements in a collection?

a. VALUE_ERROR
b. COLLECTION_IS_NULL
c. SUBSCRIPT_BEYOND_COUNT
d. SUBSCRIPT_OUTSIDE_LIMIT
Answer  Explanation 

ANSWER: SUBSCRIPT_BEYOND_COUNT

Explanation:
No explanation is available for this question!


10)   Which of the following executes the query and identifies the result set, consisting of all rows that meet the query search criteria.

a. Fetching with a Cursor
b. Opening a cursor
c. Fetching bulk data with a cursor
d. None of the above
Answer  Explanation 

ANSWER: Opening a cursor

Explanation:
No explanation is available for this question!


11)   Which statement associates a cursor variable with a multi-row query, executes the query, and identifies the result set?

a. OPEN-FOR
b. FETCH
c. CLOSE
d. All mentioned above
Answer  Explanation 

ANSWER: OPEN-FOR

Explanation:
No explanation is available for this question!


12)   LOB parameters are not permitted in a server-to-server RPC.

a. Yes
b. No
Answer  Explanation 

ANSWER: Yes

Explanation:
No explanation is available for this question!


13)   The CLOSE statement enables a cursor variable and makes the associated result set undefined.

a. True
b. False
Answer  Explanation 

ANSWER: False

Explanation:
No explanation is available for this question!


14)   You use cursor variables to pass query result sets between PL/SQL stored subprograms and various clients.

a. Yes
b. No
Answer  Explanation 

ANSWER: Yes

Explanation:
No explanation is available for this question!


15)   A subquery is a query (usually enclosed by parentheses) that appears within another SQL data manipulation statement.

a. True
b. False
Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


16)   A nested cursor is implicitly opened when the containing row is fetched from the parent cursor. The nested cursor is closed in which of the following case(s)?

a. The nested cursor is explicitly closed by the user
b. The parent cursor is re-executed
c. The parent cursor is closed
d. The parent cursor is canceled
e. All mentioned above
Answer  Explanation 

ANSWER: All mentioned above

Explanation:
No explanation is available for this question!


17)   Which datatype is used to store large blocks of character data in the database, in-line or out-of-line? Both fixed-width and variable-width character sets are supported.

a. BLOB
b. CLOB
c. BFILE
d. NCLOB
Answer  Explanation 

ANSWER: CLOB

Explanation:
No explanation is available for this question!


18)   Is it possible to define a CONSTANT value in a record?

a. Yes
b. No
Answer  Explanation 

ANSWER: No

Explanation:
No explanation is available for this question!


19)   Which data type supports only sequential access of objects?

a. LONG
b. LOB
c. Both A & B
d. None of the above
Answer  Explanation 

ANSWER: LONG

Explanation:
No explanation is available for this question!


20)   Can BOOLEAN datatype be used in functions that are called from SQL statements?

a. Yes
b. No
Answer  Explanation 

ANSWER: No

Explanation:
No explanation is available for this question!


21)   PL/SQL is a transaction processing procedural language that has which of the following advantages?

a. Integration with database
b. Better Performance
c. Higher Productivity
d. Portability
e. All mentioned above
Answer  Explanation 

ANSWER: All mentioned above

Explanation:
No explanation is available for this question!


22)   Explicit datatypes, %TYPE and %ROWTYPE, without size specification can be used for parameters in a procedure.

a. True
b. False
Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


23)   Oracle-supplied package called DBMS_LOB is used to manipulate the LOB objects.

a. True
b. False
Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


24)   What is the advantage of using the %ROWTYPE datatype?

a. It is useful to retrieve an entire row from a table. If you do not use the %ROWTYPE datatype, then you have to declare variables for each column separ
b. It can be used even if data type of the table columns is not known.
c. It ensures that data type of the variable changes dynamically if the underlying table is altered.
d. All mentioned above
e. Both A & B
Answer  Explanation 

ANSWER: All mentioned above

Explanation:
No explanation is available for this question!


25)   The LOB objects can be stored in-line or out-of-line. The in-line storage means that objects are stored.

a. Along with the row
b. Outside the row
c. Both A & B
d. None of the above
Answer  Explanation 

ANSWER: Along with the row

Explanation:
No explanation is available for this question!