Question: Write this in PL/SQL so either one will work. Problems: 1. (PL/SQL Programming) Consider the table EMPLOYEE with attributes ID, Name, and Hours, and the

Write this in PL/SQL so either one will work.

 Write this in PL/SQL so either one will work. Problems: 1.(PL/SQL Programming) Consider the table EMPLOYEE with attributes ID, Name, and Hours,and the table PAYINFO with attributes Regular, Overtime, and Cutoff, defined and

Problems: 1. (PL/SQL Programming) Consider the table EMPLOYEE with attributes ID, Name, and Hours, and the table PAYINFO with attributes Regular, Overtime, and Cutoff, defined and populated by the following script DROP TABLE EMPLOYEE CASCADE CONSTRAINTS CREATE TABLE EMPLOYEE ID Name Hours CHAR (9), VARCHAR2 (12) NUMBER (3), CONSTRAINT PK EMPLOYEE PRIMARY KEY (ID) INSERT INTO EMPLOYEE VALUES '717222144', 'Dolenz, 30); INSERT INTO EMPLOYEE VALUES '013331902", 'Jones', 50); INSERT INTO EMPLOYEE VALUES ('591342771', 'Nesmith', 65); INSERT INTO EMPLOYEE VALUES (' 822182889*, 'Tork, 25); SELECT * FROM EMPLOYEE DROP TABLE PAYINFO; CREATE TABLE PAYINFO Regular Overtime Cutoff NUMBER (4,2), NUMBER (4,2), NUMBER (2) INSERT INTO PAYINFO VALUES (15.00, 18.50, 40); SELECTFROM PAYINFO; COMMIT Write a script file Problem1.sql containing an anonymous PL/SQL block that will do the followin First, report three values found in the PAYINFO table and store them in variables. (You may assume that the PAYINFO table contains only one record.) Next, output the ID and Name of each employee in the EMPLOYEE table and their total pay, computed as Regular* Hours (Regular* Cutoff) +(Overtime * (Hours - Cutoff)) if Hours Cutoff (In other words, each employee is paid at the regular hourly rate for hours up to the cutoff value, and is paid at the higher overtime rate for any hours beyond the cutoff value.) Output each Problems: 1. (PL/SQL Programming) Consider the table EMPLOYEE with attributes ID, Name, and Hours, and the table PAYINFO with attributes Regular, Overtime, and Cutoff, defined and populated by the following script DROP TABLE EMPLOYEE CASCADE CONSTRAINTS CREATE TABLE EMPLOYEE ID Name Hours CHAR (9), VARCHAR2 (12) NUMBER (3), CONSTRAINT PK EMPLOYEE PRIMARY KEY (ID) INSERT INTO EMPLOYEE VALUES '717222144', 'Dolenz, 30); INSERT INTO EMPLOYEE VALUES '013331902", 'Jones', 50); INSERT INTO EMPLOYEE VALUES ('591342771', 'Nesmith', 65); INSERT INTO EMPLOYEE VALUES (' 822182889*, 'Tork, 25); SELECT * FROM EMPLOYEE DROP TABLE PAYINFO; CREATE TABLE PAYINFO Regular Overtime Cutoff NUMBER (4,2), NUMBER (4,2), NUMBER (2) INSERT INTO PAYINFO VALUES (15.00, 18.50, 40); SELECTFROM PAYINFO; COMMIT Write a script file Problem1.sql containing an anonymous PL/SQL block that will do the followin First, report three values found in the PAYINFO table and store them in variables. (You may assume that the PAYINFO table contains only one record.) Next, output the ID and Name of each employee in the EMPLOYEE table and their total pay, computed as Regular* Hours (Regular* Cutoff) +(Overtime * (Hours - Cutoff)) if Hours Cutoff (In other words, each employee is paid at the regular hourly rate for hours up to the cutoff value, and is paid at the higher overtime rate for any hours beyond the cutoff value.) Output each

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!