PL/SQL Multiple Choice Questions 3

PL/SQL Multiple Choice Questions 3

PL-SQL-Objective-Questions-NareshITCan you use %RowCount as a parameter to a cursor?

  1. Yes
  2. No
  3. None of the above
  4. Depends upon

Ans :  1


How is it possible to fetch a current row from a cursor without using ROWID?

  1. Where
  2. HAVING
  3. WHERE CURRENT OF
  4. None of the above

Ans : 3


How many types of ref-cursor?

  1. One
  2. Two
  3. Zero
  4. Five

Ans : 2


What are exceptions in PL/SQL?

  1. Runtime errors
  2. Runtime warnings
  3. Compile time errors
  4. Compile time warnings

Ans : 1


PL/SQL Exception message consists of -?

  1. Type of Exception
  2. An Error Code
  3. A message
  4. 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

  1. True
  2. False
  3. Depends upon
  4. None of the above

Ans : 1


SELECT INTO statement, which does not return any rows.

  1. A runtime error
  2. A syntax error
  3. Both A & B
  4. None of the above

Ans : 1


Which does not correlate with an oracle error, instead of ________?

  1. Predefined Exception
  2. Internal Exception
  3. User defined Exception
  4. None of the above

Ans : 3


Which PL/SQL warning categories gives Messages for conditions never be executed?

  1. PERFORMANCE
  2. SEVERE
  3. INFORMATIONAL
  4. All mentioned above

Ans : 3


In internal exception oracle raises the exception for you implicitly.

  1. True
  2. False
  3. Depends upon
  4. 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 ___________.

  1. “User-defined Exception”
  2. 1
  3. 0
  4. None of the above

Ans : 1


Which of the following returns the current error message text?

  1. SQLERRM
  2. SQLCODE
  3. Both A & B
  4. None of the above

Ans : 1


Which Exception is also known as Oracle named exception handler?

  1. Predefined Exception
  2. Internal Exception
  3. User defined Exception
  4. None of the above

Ans : 1


The keyword All is a shorthand way to refer to all warning messages.

  1. True
  2. False
  3. Depends upon
  4. None of the above

Ans : 1


PL/SQL Exception message consists of –

  1. Type of Exception
  2. An Error Code
  3. A message
  4. 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?

  1. INVALID_CURSOR
  2. LOGIN_DENIED
  3. TOO_MANY_ROWS
  4. DATA_NOT_FOUND

Ans : 4


What is the Oracle error code for VALUE_ERROR exception?

  1. 06592
  2. 00001
  3. 01422
  4. 06502

Ans : 4


The pre-defined exception CASE_NOT_FOUND is raised when

  1. None of the choices in the WHEN clauses of a CASE statement is selected, no else clause
  2. PL/SQL has an internal problem.
  3. A cursor fetches value in a variable having incompatible data type.
  4. None of the above.

Ans : 1


The pre-defined exception TOO_MANY_ROWS is raised when

  1. PL/SQL ran out of memory or memory was corrupted.
  2. A cursor fetches value in a variable having incompatible data type.
  3. SELECT INTO statement returns more than one row.
  4. None of the above.

Ans : 3


Which of the following code will successfully in a PL/SQL block?

  1. EXCEPTION emp_exception1;
  2. Emp_exception1 EXCEPTION;
  3. CREATE EXCEPTION emp_exception1;
  4. 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?

  1. This section starts with the EXCEPTION keyword.
  2. It is a mandatory section.
  3. It contains exception(s) that handle errors in the program.
  4. None of the above.

Ans : 2


How can exception name be associated with a error code of a defined exception?

  1. Using PRAGMA EXEC_INIT
  2. Using PRAGMA EXECPTION_INIT
  3. Using PRAGMA EXEC_INITIALIZE
  4. Using PRAGMA EXECPTION_INITIALIZE

Ans : 2


Which of the following is the correct syntax for exception handlers?

  1. IF ex_name THEN stmt
  2. WHEN ex_name THEN stmt
  3. WHERE ex_name THEN stmt
  4. 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

Click Here
Click Here
Click Here
PL/SQL Objectives 1
PL/SQL Objectives 2
PL/SQL Objectives 3
PL/SQL Objectives 4
PL/SQL Objectives 5
PL/SQL Objectives 6
PL/SQL Objectives 7
PL/SQL Objectives 8
PL/SQL Objectives 9
PL/SQL Objectives 10
PL/SQL Objectives 11
PL/SQL Objectives 12
PL/SQL Objectives 13
PL/SQL Objectives 14
PL/SQL Objectives 15

 

Share this post