Contents
- 1 PL SQL Objective Questions 2
- 1.1 Which of the following are correct results of a Boolean expression?
- 1.2 Which one of these operators does not have the same precedence as the others?
- 1.3 What are the two types of case expressions?
- 1.4 Which of the following operators has the highest precedence?
- 1.5 What happens if the none of the selector values match the selector in a simple case expression?
- 1.6 Where can a % be used in LIKE conditions in PL/SQL?
- 1.7 How is comparison made in Boolean character expression?
- 1.8 Which of the following operators does a logical expression use?
- 1.9 How many rows can a SELECT query inside a PL/SQL execution block return?
- 1.10 Which of the following statements does PL/SQL not support?
- 1.11 Which of the statements must be used inside a PL/SQL block to remove data from a table?
- 1.12 What can the VALUES clause of an INSERT statement have inside a PL/SQL block?
- 1.13 What is a savepoint inside a PL/SQL block used for?
- 1.14 Which of the following clause is not mandatory while using a SQL SELECT statement?
- 1.15 Which of the DML statements can be used inside a PL/SQL block?
- 1.16 Using which of the following clauses is the MERGE condition specified?
- 1.17 How can a user defined record be created in PL/SQL?
- 1.18 What is the initial value for a record variable declared with RECORD Type?
- 1.19 Which of the following is not TRUE about using records for database inserts or updates?
- 1.20 What is a %ROWTYPE attribute used for?
- 1.21 Which of the following about %ROWTYPE attribute is not true?
- 1.22 Which of the following is optional while using IF-THEN-ELSIF statements?
- 2 Read More PL/SQL Objective Questions and Answers
PL SQL Objective Questions 2
Which of the following are correct results of a Boolean expression?
- TRUE or FALSE
- 0 or 1
- YES or NO
- TRUE, FALSE or NULL
Ans: 4
Which one of these operators does not have the same precedence as the others?
- BETWEEN
- AND
- LIKE
- IS NULL
Ans: 2
What are the two types of case expressions?
- Simple and Compound expression
- Simple and Complex expression
- Simple and Searched expression
- Simple and Multiple expressions
Ans: 3
Which of the following operators has the highest precedence?
- BETWEEN
- NOT
- **
- ||
Ans: 3
What happens if the none of the selector values match the selector in a simple case expression?
- The CASE statement returns NULL.
- An error is thrown.
- It looks for an else statement. If no else clause is there, it returns NULL.
- It looks for an else statement. If no else clause is there, it throws an error.
Ans: 3
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Where can a % be used in LIKE conditions in PL/SQL?
- To match 1 character
- To match 0 or more character
- To match 1 or more character
- To match 0 or 1 character
Ans: 2
How is comparison made in Boolean character expression?
- Comparisons are based on the binary values of each byte in the string.
- Comparisons are based on the character values of each byte in the string.
- Comparisons are based on the binary values of each character in the string.
- Comparisons are based on the character values of each character in the string.
Ans: 1
Which of the following operators does a logical expression use?
- AND, OR
- AND, OR, NOR
- AND, OR, NOT
- AND, OR, NOR, NOT
Ans: 3
How many rows can a SELECT query inside a PL/SQL execution block return?
- One to Ten
- One only
- One or many
- One or Two
Ans: 2
Which of the following statements does PL/SQL not support?
- DML commands
- DDL commands like CREATE TABLE, ALTER TABLE
- SELECT statement
- Transaction statements like COMMIT, ROLLBACK
Ans: 2
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Which of the statements must be used inside a PL/SQL block to remove data from a table?
- DROP
- MERGE
- DROP
- DELETE
Ans: 4
What can the VALUES clause of an INSERT statement have inside a PL/SQL block?
- Column names and data
- PL/SQL variables or constants
- Scalar PL/SQL variables only
- PL/SQL constants only
Ans: 2
What is a savepoint inside a PL/SQL block used for?
- To rollback the entire transaction
- To rollback until the savepoint and end the transaction
- To rollback until the savepoint only
- To commit or rollback until the savepoint
Ans: 3
Which of the following clause is not mandatory while using a SQL SELECT statement?
- SELECT
- INTO
- FROM
- WHERE
Ans: 4
Which of the DML statements can be used inside a PL/SQL block?
- INSERT, UPDATE, DELETE or MERGE
- INSERT or UPDATE only
- INSERT, UPDATE or DELETE
- INSERT only
Ans: 1
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Using which of the following clauses is the MERGE condition specified?
- INTO
- USING
- ON
- WHEN
Ans: 3
How can a user defined record be created in PL/SQL?
- Using TYPE statement
- Using %ROWTYPE
- Using %TYPE
- Using CREATE TYPE statement
Ans: 1
What is the initial value for a record variable declared with RECORD Type?
- Value that is stored in the database
- Zero for all fields
- NULL for all fields
- NULL unless a different initial value is specified for it
Ans: 3
Which of the following is not TRUE about using records for database inserts or updates?
- If the VALUES clause of an INSERT statement contains a record variable, no other clause
- If the INTO sub clause of a RETURNING clause contains a record variable, other variable are allowed
- Record variables are not allowed in a SELECT list, WHERE clause, or ORDER BY clause.
- Record variables are allowed in the VALUES clause of an INSERT statement.
Ans: 2
What is a %ROWTYPE attribute used for?
- To declare a record variable that represents a full or partial row of a database table.
- To declare a record variable that represents a full row of a database table only.
- To declare a record variable that represents a partial row of a database table only.
- To declare a record variable from another record variable.
Ans: 1
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Which of the following about %ROWTYPE attribute is not true?
- For every column of the full or partial row, the record has a field with the same name and data type.
- If the structure of the row changes, then the structure of the record changes accordingly.
- The record fields inherit the constraints of the corresponding columns.
- The record fields do not inherit the initial values of the corresponding columns
Ans: 3
Which of the following is optional while using IF-THEN-ELSIF statements?
- END IF
- ELSE
- THEN
- ELSIF
Ans: 2
Read More PL/SQL Objective Questions and Answers