Procedure – Function
| Procedure | Function | |||||||
| Procedure (Stored Procedure) is a named PL/SQL Block which performs one or more specific task. The General Syntax to create a procedure is:
Procedure can be executed in two ways:
2. Within another procedure – simply use the procedure name.
|
Function is a named PL/SQL Block which is similar to a procedure, but the difference is function must always return a value. The General Syntax to create a function is:
Function can be executed in the following ways:
2. As a part of a SELECT statement:
3. In a PL/SQL Statements:
|
|||||||
|
There are three types of parameter to pass to procedure and function:
2. OUT parameter.
3. IN OUT parameter.
|
||||||||
References :