Fundamentals of PL/SQL - PL/SQL (MCQ) questions and answers

1)   Using DBMS_DB_VERSION Package Constants which represents the condition that the database version is less than or equal to 10; it is TRUE.
- Published on 09 Jul 15

a. VER_LE_10
b. VER_LE_10_2
c. Both A & B
d. None of the above
Answer  Explanation 

ANSWER: VER_LE_10

Explanation:
VER_LE_10 is a boolean type of a constant. Its version is less than or equal to 10. VER_LE_10 is a type of DB version.


2)   PL/SQL Server Pages (PSPs) enable you to develop Web pages with dynamic content.
- Published on 09 Jul 15

a. True
b. False
Answer  Explanation 

ANSWER: True

Explanation:
PL/SQL Server Pages (PSPs) enable you to develop Web pages with dynamic content. In this the PL/SQL scripts are embedded in the HTML pages.


3)   A searched CASE expression lets you test different conditions instead of comparing a single expression to various values.
- Published on 09 Jul 15

a. Yes
b. No
Answer  Explanation 

ANSWER: Yes

Explanation:
A searched CASE expression does not contain any selector. A search condition can also be found in each WHEN clause to determine a BOOLEAN value. Besides this, it also allows the testing of different variables or multiple conditions in a single WHEN clause.


4)   PL/SQL provides many powerful functions to help you manipulate data. These built-in functions fall into which of these following categories?
- Published on 09 Jul 15

a. Error reporting,Character, Datatype conversion
b. Number,Date,Object reference
c. Miscellaneous
d. All mentioned above
Answer  Explanation 

ANSWER: All mentioned above

Explanation:
No explanation is available for this question!


5)   Which of the following is an explicit numeric, character, string, or BOOLEAN value not represented by an identifier?
- Published on 09 Jul 15

a. Delimiters
b. Literals
c. Comments
d. None of the above
Answer  Explanation 

ANSWER: Literals

Explanation:
Literals are similar to the constants. There are 4 types of literals
1. Text literals
2. Integer literals
3. Number
4. Date/Time literals.


6)   In CASE Expressions, which expression selects a result from one or more alternatives, and returns the result?
- Published on 09 Jul 15

a. Simple CASE Expression
b. Searched CASE Expression
c. Both A & B
d. None of the above
Answer  Explanation 

ANSWER: Simple CASE Expression

Explanation:
The CASE statement helps to select and execute one set of statements. It uses a selector rather than the multiple Boolean expression to select the sequence. An expression whose value will be used to select one of the several alternatives is known as an selector.


7)   From the following PL/SQL Delimiters which symbol is exponentiation operator.
- Published on 09 Jul 15

a. <>
b. ~=
c. **
d.
Answer  Explanation 

ANSWER: **

Explanation:
The **(Exponentiation operator) raises one operand to the power of the other.


8)   PL/SQL is completely portable, high-performance transaction processing language that offers which of the following advantages -
- Published on 09 Jul 15

a. Tight Integration with SQL
b. Better Performance
c. Higher Productivity,Full Portability,Tight Security
d. All mentioned above
Answer  Explanation 

ANSWER: All mentioned above

Explanation:
No explanation is available for this question!


9)   Which of the following has a return type in its specification and must return a value specified in that type?
- Published on 09 Jul 15

a. Function
b. Procedure
c. Package
d. None of the above
Answer  Explanation 

ANSWER: Function

Explanation:
Functions in a subprogram act like new expressions and operators. A function computes a value in a subprogram. The function has a return clause.


10)   Which of the following is used to declare a record?
- Published on 09 Jul 15

a. %ROWTYPE
b. %TYPE
c. Both A & B
d. None of the above
Answer  Explanation 

ANSWER: %ROWTYPE

Explanation:
The %ROWTYPE attribute helps in creating table and cursor based records.


1 2 3