ITE 407 - LAB - EX - 5 - 04112017 - wk10
ITE 407 - LAB - EX - 5 - 04112017 - wk10
ITE 407 - LAB - EX - 5 - 04112017 - wk10
Objective
Background/Theory
Please take special note that this lab exercise has been recast from the Challenge questions in Lab
exercise 4.
Parameters are used to transfer data values to and from the calling environment and the procedure (or
subprogram). Parameters are declared in the subprogram header, after the name and before the
declaration section for local variables.
Parameters are subject to one of the three parameter-passing modes: IN, OUT, or IN OUT.
An IN parameter passes a constant value from the calling environment into the procedure.
An OUT parameter passes a value from the procedure to the calling environment.
An IN OUT parameter passes a value from the calling environment to the procedure and a
possibly different value from the procedure back to the calling environment using the
same parameter.
Parameters can be thought of as a special form of local variable, whose input values are initialized by
the calling environment when the subprogram is called, and whose output values are returned to the
calling environment when the subprogram returns control to the caller.
Tools/Equipment
The following resources will be required to successfully complete the tasks in this lab:
1. Write out the following PL/SQL Procedure and observe the IN and OUT
parameters:
(a) Write an anonymous block that runs this procedure with variables to
take the parameters from the procedure created. [4]
(c) What values will the emp_name and emp_sal parameters hold? [2]