Subprograms in PL/SQL are similar to any other procedural language. The syntax of defining function and procedure is given below.
where parameter stands for the following syntax:
where datatype is any type, either simple or user-defined. IN, OUT, IN OUT define the behavior of formal parameters. IN parameter lets you pass values to subprogram, but a value cannot be assigned to IN parameters. OUT parameter lets the subprogram to return values to the caller. IN OUT variables allows the user to pass initial values to the subprogram and return updated values to the caller.