Question: Create a PI/SQL function named AVG_SAL that will return the average salary from the employees table. You must develop your own average function. You
Create a PI/SQL function named AVG_SAL that will return the average salary from the employees table. You must develop your own average function. You cannot use the inbuilt min function. Use cursor to fetch the records from employee table. Create a PI/SQL function named Check LName, that will check whether the name is present in the last name column of employees table. You cannot use select operation to check whether name is present or not. You cannot use the inbuilt function. You must use explicit cursor. Create a PI/SQL procedure named CALC_TAX, which will calculate the annual tax to be paid by an employee based on his salary. You have to pass two parameters one is to supply input to procedure, and one is to get output from the procedure. Input should be the EMPLOYEE_ID AND OUTPUT WILL BE ANNUAL TAX OF THE EMPLOYEE. TAX=((SALARY*12)-10000)*.09
Step by Step Solution
3.48 Rating (164 Votes )
There are 3 Steps involved in it
This is how I would answer the three part question The first question was to create a PLSQL function named AVGSAL that will return the average salary ... View full answer
Get step-by-step solutions from verified subject matter experts
