PL/SQL Multiple Choice Questions 3
Can you use %RowCount as a parameter to a cursor?
- Yes
- No
- None of the above
- Depends upon
Ans : 1
How is it possible to fetch a current row from a cursor without using ROWID?
- Where
- HAVING
- WHERE CURRENT OF
- None of the above
Ans : 3
How many types of ref-cursor?
- One
- Two
- Zero
- Five
Ans : 2
What are exceptions in PL/SQL?
- Runtime errors
- Runtime warnings
- Compile time errors
- Compile time warnings
Ans : 1
PL/SQL Exception message consists of -?
- Type of Exception
- An Error Code
- A message
- All mentioned above
Ans : 4
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
PL/SQL provides a feature to handle the Exceptions which occur in a PL/SQL Block
- True
- False
- Depends upon
- None of the above
Ans : 1
SELECT INTO statement, which does not return any rows.
- A runtime error
- A syntax error
- Both A & B
- None of the above
Ans : 1
Which does not correlate with an oracle error, instead of ________?
- Predefined Exception
- Internal Exception
- User defined Exception
- None of the above
Ans : 3
Which PL/SQL warning categories gives Messages for conditions never be executed?
- PERFORMANCE
- SEVERE
- INFORMATIONAL
- All mentioned above
Ans : 3
In internal exception oracle raises the exception for you implicitly.
- True
- False
- Depends upon
- None of the above
Ans : 1
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
For a user-defined exception, SQLCODE returns 1, and SQLERRM returns ___________.
- “User-defined Exception”
- 1
- 0
- None of the above
Ans : 1
Which of the following returns the current error message text?
- SQLERRM
- SQLCODE
- Both A & B
- None of the above
Ans : 1
Which Exception is also known as Oracle named exception handler?
- Predefined Exception
- Internal Exception
- User defined Exception
- None of the above
Ans : 1
The keyword All is a shorthand way to refer to all warning messages.
- True
- False
- Depends upon
- None of the above
Ans : 1
PL/SQL Exception message consists of –
- Type of Exception
- An Error Code
- A message
- All mentioned above
Ans : 4
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Which is not a pre defined Exception?
- INVALID_CURSOR
- LOGIN_DENIED
- TOO_MANY_ROWS
- DATA_NOT_FOUND
Ans : 4
What is the Oracle error code for VALUE_ERROR exception?
- 06592
- 00001
- 01422
- 06502
Ans : 4
The pre-defined exception CASE_NOT_FOUND is raised when
- None of the choices in the WHEN clauses of a CASE statement is selected, no else clause
- PL/SQL has an internal problem.
- A cursor fetches value in a variable having incompatible data type.
- None of the above.
Ans : 1
The pre-defined exception TOO_MANY_ROWS is raised when
- PL/SQL ran out of memory or memory was corrupted.
- A cursor fetches value in a variable having incompatible data type.
- SELECT INTO statement returns more than one row.
- None of the above.
Ans : 3
Which of the following code will successfully in a PL/SQL block?
- EXCEPTION emp_exception1;
- Emp_exception1 EXCEPTION;
- CREATE EXCEPTION emp_exception1;
- CREATE emp_exception1 AS EXCEPTION;
Ans : 2
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Which is not true about the exception handling section of a PL/SQL block?
- This section starts with the EXCEPTION keyword.
- It is a mandatory section.
- It contains exception(s) that handle errors in the program.
- None of the above.
Ans : 2
How can exception name be associated with a error code of a defined exception?
- Using PRAGMA EXEC_INIT
- Using PRAGMA EXECPTION_INIT
- Using PRAGMA EXEC_INITIALIZE
- Using PRAGMA EXECPTION_INITIALIZE
Ans : 2
Which of the following is the correct syntax for exception handlers?
- IF ex_name THEN stmt
- WHEN ex_name THEN stmt
- WHERE ex_name THEN stmt
- CASE ex_name THEN stmt
Ans : 2
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Read More PL/SQL Objective Questions and Answers