Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 REPORTStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started