Stored Procedures MCQ Questions And Answers
Stored Procedures MCQs : This section focuses on "Stored Procedures" in Pl/Sql. These Multiple Choice Questions (MCQ) should be practiced to improve the Pl/Sql skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.
1. A __________ is a program unit/module that performs a particular task.
A. procedure
B. subprogram
C. program
D. trigger
View Answer
Ans : B
Explanation: A subprogram is a program unit/module that performs a particular task. These subprograms are combined to form larger programs.
2. Subprograms that do not return a value directly known as?
A. Functions
B. Procedures
C. Triggers
D. None of the above
View Answer
Ans : B
Explanation: Procedures : These subprograms do not return a value directly; mainly used to perform an action.
3. Which of the following is mandatory part in procedure?
A. Declarative Part
B. Exception-handling
C. Executable Part
D. All of the above
View Answer
Ans : C
Explanation: Executable Part : This is a mandatory part and contains statements that perform the designated action.
4. A procedure is created with the __________ statement.
A. CREATE PROCEDURE
B. REPLACE PROCEDURE
C. Both A and B
D. None of the above
View Answer
Ans : C
Explanation: A procedure is created with the CREATE OR REPLACE PROCEDURE statement.
5. A standalone procedure can be called in ______ ways.
A. 1
B. 2
C. 3
D. 4
View Answer
Ans : B
Explanation: A standalone procedure can be called in two ways : Using the EXECUTE keyword and Calling the name of the procedure from a PL/SQL block.
6. A standalone procedure is deleted with the ________ statement
A. REMOVE PROCEDURE
B. DELETE PROCEDURE
C. Both A and B
D. DROP PROCEDURE
View Answer
Ans : D
Explanation: A standalone procedure is deleted with the DROP PROCEDURE statement
7. An ______ parameter lets you pass a value to the subprogram.
A. IN
B. OUT
C. IN OUT
D. None of the above
View Answer
Ans : A
Explanation: An IN parameter lets you pass a value to the subprogram.
8. An IN OUT parameter passes an initial value to a subprogram and returns an updated value to the caller.
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A
Explanation: Yes, An IN OUT parameter passes an initial value to a subprogram and returns an updated value to the caller.
9. Actual parameters can be passed in ________ ways.
A. 1
B. 2
C. 3
D. 4
View Answer
Ans : C
Explanation: Actual parameters can be passed in three ways : Positional notation, Named notation and Mixed notation.
10. In mixed notation, you can mix both notations (Positional Notation and Named Notation) in procedure call.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, In mixed notation, you can mix both notations (Positional Notation and Named Notation) in procedure call.
Discussion