Oracle Functions MCQs

Oracle Functions MCQs: This section contains multiple-choice questions and answers on functions in Oracle.
Submitted by Anushree Goswami, on June 13, 2022

1. Functions return a single value from a ____.

  1. Program
  2. Subprogram
  3. Superprogram
  4. None

Answer: B) Subprogram

Explanation:

Functions return a single value from a subprogram.

Discuss this Question


2. Before invoking a function, it must be ____.

  1. Declared
  2. Defined
  3. Both A and B
  4. None of the above

Answer: C) Both A and B

Explanation:

Before invoking a function, it must be declared and defined.

Discuss this Question


3. Defining and declaring can be done in the ____.

  1. Same block
  2. Separately
  3. Both A and B
  4. None of the above

Answer: C) Both A and B

Explanation:

Defining and declaring can be done in the same block or they can be done separately.

Discuss this Question


4. Which of the following is present in the Create function?

  1. RETURN
  2. IS
  3. END
  4. All of the above

Answer: D) All of the above

Explanation:

RETURN, IS and END are all present in the Create function.

Discuss this Question


5. Which of the following is not present in the Create function?

  1. CREATE
  2. AS
  3. BEGIN
  4. None of the above

Answer: D) None of the above

Explanation:

CREATE, AS, BEGIN are all present in the Create function.

Discuss this Question


6. Which of the following parameters are present in Oracle function?

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

Answer: D) All of the above

Explanation:

All IN, OUT, IN OUT parameters are present in Oracle function.

Discuss this Question


7. ____ can call another subprograms.

  1. Programs
  2. Subprograms
  3. Both A and B
  4. None of the above

Answer: C) Both A and B

Explanation:

Programs and subprograms can call other programs and subprograms.

Discuss this Question


8. The drop function syntax is the best way to ____ your created functions from the database.

  1. Add
  2. Remove
  3. Fetch
  4. Store

Answer: B) Remove

Explanation:

The drop function syntax is the best way to remove your created functions from the database.

Discuss this Question


9. What is the syntax to drop a function?

  1. DROP PROCEDURE function_name;
  2. DELETE PROCEDURE function_name;
  3. DROP FUNCTION function_name;
  4. DELETE FUNCTION function_name;

Answer: C) DROP FUNCTION function_name;

Explanation:

The syntax to drop a function is DROP FUNCTION function_name;.

Discuss this Question


10. Subprograms can call themselves recursively, which is known as ____.

  1. Retrieval
  2. Recall
  3. Recursion
  4. Repetition

Answer: C) Recursion

Explanation:

Subprograms can call themselves recursively, which is known as recursion.

Discuss this Question





Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.