Basic Oracle Concepts and Programming Question:
Download Job Interview Questions and Answers PDF
What Is a Procedure in Oracle?
Answer:
A procedure is a named program unit. It consists of three parts:
► Declaration Part - Defining the procedure name, calling parameters, local variables and local procedures. Declaration part is required.
► Execution Part - Defining execution logic with executable statements. Execution part is required.
► Exception Part - Defining error handling logics. Exception part is optional.
Here how a complete procedure should look like:
PROCEDURE name (parameter_1, parameter_2) AS
-- Declaration statements
BEGIN
-- Executable statements
EXCEPTION
-- Error handling statements
END;
► Declaration Part - Defining the procedure name, calling parameters, local variables and local procedures. Declaration part is required.
► Execution Part - Defining execution logic with executable statements. Execution part is required.
► Exception Part - Defining error handling logics. Exception part is optional.
Here how a complete procedure should look like:
PROCEDURE name (parameter_1, parameter_2) AS
-- Declaration statements
BEGIN
-- Executable statements
EXCEPTION
-- Error handling statements
END;
Download Oracle Database Interview Questions And Answers
PDF
Previous Question | Next Question |
How To Test NULL Values? | What Is an Oracle Function? |