1.Create a function called GET_ANNUAL_COMP to return the annual salary computed from an employees monthly salary and commission passed as parameters.
a.Develop and store the function GET_ANNUAL_COMP, accepting parameter values for monthly salary and commission. Either or both values passed can be NULL, but the function should still return a non-NULL annual salary. Use the following basic formula to calculate the annual salary:
(salary*12) + (commission_pct*salary*12)
Test the function using host variable:
1> if salary and commission_pct have valid data
2> if salary has a valid data, but commission_pct is NULL
3> if salary is NULL, but commission _pct has a valid data
4> both salary and commission_pct are NULL
b.Use the function in a SELECT statement against the EMPLOYEES table for employees in department 30.
2.Document your code and capture a screen shot for each test you perform.
1.Create a function called GET_YRS_OF_SERVICE to return the years of service of each employee computed from an employees hire date.
a.Develop and store the function GET_YRS_OF_SERVICE, accepting parameter values for date_hired.
Test the function using an anonymous PL/SQL block:
b.Use the function in a SELECT statement against the EMPLOYEES table for employees in department 80.
2.Document your code and capture a screen shot for each test you perform.