PL SQL Practice Test 6

PL-SQL-Objective-Questions-NareshIT

PL SQL Practice Test 6

PL-SQL-Objective-Questions-NareshITWhenever compiler implicitly converts the data type of the actual to formal parameter?

  1. When pass by reference
  2. Always, when pass by any method
  3. It never converts implicitly and has to be explicitly done by user
  4. When pass by value

Ans : 4


What are the two different types of values for a parameter?

  1. Default and System given
  2. Default and user given
  3. System given and user given
  4. Compile time and run time values

Ans : 2


What happens data type of the actual parameter is not  same as formal parameter?

  1. An error is thrown.
  2. The parameter is skipped and not passed.
  3. Compiler performs an implicit conversion and if possible no error is thrown.
  4. The PL/SQL code abruptly terminates.

Ans : 3


How is the formal parameter treated when the mode of the parameter is IN OUT?

  1. Formal parameter acts like an uninitialized value.
  2. Formal parameter is initialized to the default value of its type
  3. Formal parameter acts like an initialized variable
  4. Formal parameter acts like a constant.

Ans : 3


What happens when we execute two subprograms that cannot be overloaded?

  1. Compile time error
  2. Compile time warning
  3. Run time error
  4. Run time warning

Ans : 1


Attend Free Demo and Learn   SQL SERVER ONLINE TRAINING   by Real-Time Expert


How is a mixed notation used for matching formal and actual parameters?

  1. First two parameters is by position and others are by names
  2. Any number of parameters can be passed by position and the rest are passed by names
  3. First parameter is by position and others are by names
  4. Last parameter is by position and others are by names

Ans :  3


What happens when we specify parameters using named notations in wrong order?

  1. There is no wrong order while using named notations
  2. This can cause problems that are hard to detect.
  3. These problems are detected using PL/SQL compiler
  4. Run time errors are thrown when such a problem occurs

Ans :  1


What is result i. PROCEDURE s (p INTEGER) IS   ii. PROCEDURE s (p REAL) IS …

  1. Successful
  2. Error because formal parameters differ only in mode
  3. Error because the name of the procedures are same
  4. Error because formal parameters differ only in subtype

Ans : 4


What are overloaded subprograms?

  1. Two or more subprograms that can have the same name with different parameter lists.
  2. Two subprograms that can have different name with different parameter lists.
  3. Two or more subprograms that can have the same name with same parameter lists.
  4. Two or more subprograms that can have different name with same parameter lists.

Ans :  1


Where can overloaded subprograms be used in PL/SQL?

  1. Anywhere in PL/SQL
  2. Inside an anonymous block only
  3. Inside the declaration section of a PL/SQL block or inside a package
  4. Inside a package only

Ans :  3


Attend Free Demo and Learn   SQL SERVER ONLINE TRAINING   by Real-Time Expert


Which of the following subprograms cannot be overloaded?

  1. Nested subprogram
  2. Standalone subprogram
  3. Package subprogram
  4. Nested and Package subprogram

Ans :  2


What is the statement to remove a procedure from a database?

  1. ALTER PROCEDURE
  2. DROP PROCEDURE
  3. DELETE PROCEDURE
  4. TRUNCATE procedure.

Ans : 2


Which is a procedural extension of Oracle- SQL language ?

  1. PQL
  2. Advanced SQL
  3. PL/SQL
  4. SQL

Ans :  3


Which subprogram is used to compute a value?

  1. Procedure
  2. Function
  3. Both A & B
  4. None of the above

Ans :  2


In which parameter mode Formal parameter acts like an initialized variable?

  1. IN
  2. OUT
  3. IN OUT
  4. None of the above

Ans : 3


Attend Free Demo and Learn   SQL SERVER ONLINE TRAINING   by Real-Time Expert


 Which subprogram acts like new expressions and operators?

  1. Procedures
  2. Functions
  3. Both A & B
  4. None of the above

Ans :  2


Subprograms are named PL/SQL blocks that can be called with a set of parameters.

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

Ans :  1


The variables or expressions passed from the calling subprogram are –

  1. Actual Parameters
  2. Formal Parameters
  3. Both A & B
  4. None of the above

Ans :  1


 Which statement lets you create standalone functions that are stored  Database?

  1. CREATE PROCEDURE
  2. CREATE FUNCTION
  3. Both A & B
  4. None of the above

Ans :  2


 A recursive subprogram is one that calls itself.

  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


Which of the following is a way of passing parameters to PL/SQL subprograms?

  1. Positional notation
  2. Named notation
  3. Mixed notation
  4. All of the above.

Ans : 4


How many ways we can execute a procedure?

  1. 3
  2. 0
  3. 4
  4. 2

Ans :  1


What are the three parameter modes for procedures?

  1. IN, OUT, IN OUT
  2. Read, Write, Append
  3. CONSTANT, VARIABLE, DEFAULT
  4. COPY, NO COPY, REF

Ans :  1


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