Contents
- 1 PL/SQL Multiple Choice Questions
- 1.1 How many ELSE clauses can an IF statement have?
- 1.2 Which of the following is equivalent to multiple IF-ELSIF statements?
- 1.3 Which of the following statements can be used to terminate a PL/SQL loop?
- 1.4 Which of the following is not a PL/SQL unit?
- 1.5 Which of the following is true about scalar data types in PL/SQL?
- 1.6 Which keyword is used instead of the assignment operator to initialize variables?
- 1.7 Which of the following is used to declare a record?
- 1.8 Which of the following is not true about PL/SQL constants and literals?
- 1.9 What value will be assigned to the variable declared as − counter binary_integer;
- 1.10 Which of the following is not true about PL/SQL decision making structures?
- 1.11 What is the initial value of index for a reverse for loop?
- 1.12 Which of the following is explicit numeric, string, or BOOLEAN value not represented identifier?
- 1.13 Which of the following is not true about large object data types and in PL/SQL?
- 1.14 Which of the following is true about comments in PL/SQL?
- 1.15 Which of the following is not true about labeling PL/SQL loops?
- 1.16 Which is a simple or compound symbol that has a special meaning to PL/SQL?
- 1.17 PL/SQL is a procedural language that has which of the following advantages?
- 1.18 Can BOOLEAN datatype be used in functions that are called from SQL statements?
- 1.19 Which data type supports only sequential access of objects?
- 1.20 Is it possible to define a CONSTANT value in a record?
- 1.21 Which datatypes can be used with a RECORD Type?
- 1.22 Which of the following correctly defines a cursor?
- 2 Read More PL/SQL Objective Questions and Answers
PL/SQL Multiple Choice Questions
How many ELSE clauses can an IF statement have?
- 0 or 1
- Always 1
- 1 or 2
- 1 to 10
Ans : 1
Which of the following is equivalent to multiple IF-ELSIF statements?
- LOOP statement
- FOR statement
- WHILE statement
- CASE statement
Ans : 3
Which of the following statements can be used to terminate a PL/SQL loop?
- GOTO
- EXIT WHEN
- CONTINUE WHEN
- KILL
Ans : 2
Which of the following is not a PL/SQL unit?
- Table
- Type
- Trigger
- Package
Ans : 1
Which of the following is true about scalar data types in PL/SQL?
- They hold single values with no internal components.
- Examples of scalar data types are NUMBER, DATE, or BOOLEAN.
- PL/SQL provides subtypes of data types.
- All are true.
Ans : 4
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Which keyword is used instead of the assignment operator to initialize variables?
- NOT NULL
- DEFAULT
- %TYPE
- %ROWTYPE
Ans : 2
Which of the following is used to declare a record?
- %ROWTYPE
- %TYPE
- Both A & B
- None of the above
Ans : 1
Which of the following is not true about PL/SQL constants and literals?
- A constant holds a value that once declared, does not change in the program.
- The CONSTANT declaration cannot impose the NOT NULL constraint.
- A constant is declared using the CONSTANT keyword.
- A CONSTANT declaration requires an initial value.
Ans : 2
What value will be assigned to the variable declared as − counter binary_integer;
- 0
- 1
- NULL
- None of the above.
Ans : 3
Which of the following is not true about PL/SQL decision making structures?
- The IF statement associates a condition with a sequence of statements enclosed by THEN and END IF.
- The IF statement also adds the keyword ELSE followed by an alternative sequence of statement.
- The IF-THEN-ELSIF statement allows you to choose between several alternatives.
- PL/SQL does not have a CASE statement
Ans : 4
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
What is the initial value of index for a reverse for loop?
- UPPER bound
- Lower bound
- 1
- Upper bound-Lower bound/2
Ans : 1
Which of the following is explicit numeric, string, or BOOLEAN value not represented identifier?
- Delimiters
- Literals
- Comments
- None of the above
Ans : 2
Which of the following is not true about large object data types and in PL/SQL?
- BFILE is used to store large binary objects in operating system files outside the database.
- BLOB is used to store character data in the database.
- CLOB is used to store large blocks of character data in the database.
- NCLOB is used to store large blocks of NCHAR data in the database.
Ans : 2
Which of the following is true about comments in PL/SQL?
- Comments are explanatory statements.
- The PL/SQL single-line comments start with the delimiter — (double hyphen)
- Multi-line comments are enclosed by /* and */.
- All of the above.
Ans : 4
Which of the following is not true about labeling PL/SQL loops?
- PL/SQL loops can be labeled.
- The label should be enclosed by angle brackets (< and >).
- The label name appears at the beginning of the LOOP statement.
- The label name can also appear at the end of the LOOP statement or with an EXIT statement.
Ans : 2
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Which is a simple or compound symbol that has a special meaning to PL/SQL?
- Delimiters
- Identifiers
- Literals
- Comments
Ans : 1
PL/SQL is a procedural language that has which of the following advantages?
- Integration with database
- Better Performance
- Portability
- All mentioned above
Ans : 4
Can BOOLEAN datatype be used in functions that are called from SQL statements?
- Yes
- No
- Depends upon
- Invalid option
Ans : 2
Which data type supports only sequential access of objects?
- LONG
- LOB
- Both A & B
- None of the above
Ans : 1
Is it possible to define a CONSTANT value in a record?
- Yes
- No
- Depends upon
- Invalid option
Ans : 2
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Which datatypes can be used with a RECORD Type?
- NUMBER,VARCHAR2
- %TYPE OR %ROWTYPE
- REF,CURSOR
- BOTH A & B
Ans : 4
Which of the following correctly defines a cursor?
- A cursor is a pointer to a temporary work area created in the system memory
- A cursor is a pointer to a permanent work area created in the system memory
- A cursor is a pointer to a temporary area DDL statement.
- A cursor is a pointer to a permanent work area created in DDL statement.
Ans : 1
Read More PL/SQL Objective Questions and Answers