The PL/SQL Procedure is a subprogram or module which perform specific task. A subprogram can be invoked by another subprogram or module which is called the calling program. A subprogram can be created at: the schema level, inside a package, inside a PL/SQL block.
A procedure contains a header and a body.
Header: The header part consist of name of the procedure and the parameters passed to the procedure.
Body: The body part consist of a declaration section, execution section and exception section similar to a general PL/SQL block.
There are three ways to pass parameters in procedure:
To create a procedure use CREATE OR REPLACE PROCEDURE statement, use the following syntax:
procedure-name: The name of the procedure_name.
[OR REPLACE]: This option used to modify of an existing procedure.
parameter_name: The optional parameter list contains name, mode and types of the parameters.
procedure-body: This part contains executable block.
IS | AS: The AS keyword is used instead of the IS keyword for creating a standalone procedure.
EXECUTEand in PL/SQL block: