PL/SQL Datatypes - PL/SQL (MCQ) questions and answers
Here, you can read PL/SQL Datatypes multiple choice questions and answers with explanation.
1) The LOB objects can be stored in-line or out-of-line. The in-line storage means that objects are stored. - Published on 09 Jul 15
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: It means that there is a locater which stores the row along with the other table columns which in turn points to the real data.
|
|
2) What is the advantage of using the %ROWTYPE datatype? - Published on 09 Jul 15
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 separately.
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!
|
|
3) Oracle-supplied package called DBMS_LOB is used to manipulate the LOB objects. - Published on 09 Jul 15
a. True
b. False
Answer
Explanation
|
ANSWER: True
Explanation: The subprograms which are required to operate on BLOBs, CLOBs, NCLOBs, BFILEs, and temporary LOBs are provided by the DBMS_LOB package. They are used to access and manipulate the specific parts of the LOB or complete LOBs.
|
|
4) Explicit datatypes, %TYPE and %ROWTYPE, without size specification can be used for parameters in a procedure. - Published on 09 Jul 15
a. True
b. False
Answer
Explanation
|
ANSWER: True
Explanation: These attributes allow parameters because the result of both are unconstrained declarations.
|
|
5) PL/SQL is a transaction processing procedural language that has which of the following advantages? - Published on 09 Jul 15
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!
|
|
6) Can BOOLEAN datatype be used in functions that are called from SQL statements? - Published on 09 Jul 15
a. Yes
b. No
Answer
Explanation
|
ANSWER: No
Explanation: The BOOLEAN datatype answers in either a YES or a NO and a function cannot be returned as a YES or no.
|
|
7) Which data type supports only sequential access of objects? - Published on 09 Jul 15
a. LONG
b. LOB
c. Both A & B
d. None of the above
Answer
Explanation
|
ANSWER: LONG
Explanation: LONG is a data type of PL/SQL. It stores variable length character strings.
|
|
8) Is it possible to define a CONSTANT value in a record? - Published on 09 Jul 15
a. Yes
b. No
Answer
Explanation
|
ANSWER: No
Explanation: A CONSTANT is a reserved word whose value does not change at all.
|
|
9) 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. - Published on 09 Jul 15
a. BLOB
b. CLOB
c. BFILE
d. NCLOB
Answer
Explanation
|
ANSWER: CLOB
Explanation: No explanation is available for this question!
|
|
10) Which datatype is not allowed in the definition of PL/SQL record? - Published on 08 Jul 15
a. A Collection
b. A Scalar
c. Both A & B
d. None of the above
Answer
Explanation
|
ANSWER: A Collection
Explanation: An ordered group of elements all of the same type is known as a collection.
|
|