- Stored Procedure with Output Parameters
a. Add a MgrID column to your emp table.
b. Populate it accordingly using the integer data type and same number of characters as the empID column
c. Build a SP that passes in empID and returns an output parameter of the mgrID - (Create the SP and verify it works correctly) (Keep in mind that the mgrID will also be an individual’s empID., since managers are also employees)
d. (Start a New Query and separate it from the previous Stored Procedure) Declare an empid int and manager_name Varchar (50) variable
e. Hard code your new empid variable and Pass it into your new SP to return the mgrid
(Use an actual empid in the variable location to test and Pass it into your new SP to return the mgrID)
f. Capture that mgrid in a variable and use that mgrid variable to determine the Managers name
(Create another statement which locates the Manager’s Name by using mgrID)
e. Print the Managers name