Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

4. What advice would you give to Carol Sullivan-Diaz?

Answered: 1 week ago