Question: sql Exercise 1. Run the following statements to create the emp table with data to be used in this exercise. Drop table emp create table

 sql Exercise 1. Run the following statements to create the emp

sql

Exercise 1. Run the following statements to create the emp table with data to be used in this exercise. Drop table emp create table emp as select trom employees 2. Create a cursor named CUR EMP that includes the employee id, first name, last name, job and salary from the emp table where the job id is either PU_CLERK or SH CLERK 3. Create a type named TYPE EMP that includes the same fields as cursor CUR EMP 4. Create a record named EMP REC of TYPE EMP 5. Create a variable named NE WSAL that is the same datatype as the employee's salary 6. Processing to occur for each record(use loop of choice) a. If the job is PU CLERK the NEWS AL is the salary with a 5% raise. b. Ifthe job is SHCLERK the NEWSAL is the salary with a 3% raise. Display each of the following on a separate line(with appropriate labels): , c. i. First and last name ii. Current salary iii. New salary A message should be displayed when all records have been processed to state the end of data had been reached 7. Sample Output anonymous block completed NAME: Alexander Khoo CURRENT SALARY: 3100 NEW SALARY: 3255 NAME: Douglas Grant CURRENT SALARY: 2600 NEW SALARY: 2678 END OF REPORT

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!