A parameter is a value that you can pass from a block of statements to a function.
The Syntax for Defining a Parameter
parameter_name [MODE] parameter_type [:= value | DEFAULT value]
parameter_name is the name you assign to the parameter
parameter_type is the variable type you assign.
The optional MODE statement gives you complete control over your incoming parameters.
The simplest parameter can be coded as
(p_squared NUMBER)
p_squared is the parameter_name, and NUMBER is the parameter_type.
You can add a %TYPE after the parameter.
%TYPE will pick up the field type from the table.
(p_emptype employee.pay_type%TYPE)
Types of modes.
MODE | Handling of Parameter |
IN | Read-only |
OUT | Write-only |
IN OUT | Read or write |