Question: Write a script that creates and executes a procedure named ComplexProc and then drops it.The procedure ComplexProc performs the following task: find employees whose salaries

Write a script that creates and executes a procedure named ComplexProc and then drops it.The procedure ComplexProc performs the following task: find employees whose salaries are higher than the average salary of all the employees in the same department and who have two or more dependents; then, for each found employee, check if the employee works more than a total of 10 hours a week on projects not controlled by his/her home department and, if so,print the employees full name (e.g., Byung S. Lee), salary, the number of dependents, thetotal number of hours on projects controlled by the home department, and the total number of hours on projects controlled by the other (i.e., non-home) departments. Format the output of the procedure to make it look nice.

Write a script that creates and executes a procedure named ComplexProc and

Figure 5.7 Referential integrity constraints displayed on the COMPANY relational database schema. EMPLOYEE Fname Minit Lname Ssn Bdate Address Sex Salary Super ssn Dno DEPARTMENT Dname Dnumber Mgr ssn Mgr_start_date DEPT LOCATIONS DnumberDlocation PROJECT Pname Pumber Plocation Dnum WORKS ON Essn Pno Hours DEPENDENT Essn Dependent name Sex Bdate Relationshi

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!