Thursday, March 8, 2012

Another Function question

I hope I am not resubmitting this question, but I can't find my original submittal...

Here is another function problem that I have (luckily, the last). I hope there is someone out there who is bored and might want to give this one a try. If not, that's okay, I think completing 4 out of 5 questions is pretty good. hehe

Question:

Create a function (EMP_SAL_STATS) that computes the maximum salary for employees in the EMPLOYEES table. Note: do not use the built in function MAX. You must create your own MAX function.

In addition, create a driver program that runs the function. Show all work including the output from running the procedure.

My two lines of work (haha):
CREATE OR REPLACE FUNCTION emp_sal_stats
(p_employee_id employees.empoyee_id%TYPE)My one line of hint: Maybe you could order the data descending and then fetch one row?|||Thank you very much. I will give it a try.

Cyndi

No comments:

Post a Comment