Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

section 1 1a. Write a PL/SQL script to create a PROCEDURE that will list the employee names given the country ID. 1b. Call the procedure

section 1

1a. Write a PL/SQL script to create a PROCEDURE that will list the employee names given the country ID.

1b. Call the procedure from an anonymous block to allow the user to key in the country ID (country_id).

Expected output:

Enter the country id: US

The employee(s) in the UNITED STATES OF AMERICA are as follows:

1. Steven King 2. Neena Kochhar 3. Lex De Haan 4. Alexander Hunold 5. Bruce Ernst 6. David Austin

...

PL/SQL procedure successfully completed.

section 2 :

2a. Write a PL/SQL script to create a FUNCTION that calculates the bonuses for employees according to their job position.

2b. Call the function from an anonymous block to allow the user to key in the employee ID (employee_id).

Below is the bonus detail for each job:

JOB TITLE

BONUS

(%)

Stock Clerk

7

Shipping Clerk

10

Purchasing Clerk

15

Programmer

20

Other Jobs

5

Expected Output:

Enter the employee ID: 105

The bonus amount to be paid for David Austin is RM 960.00

PL/SQL procedure successfully completed.

OR

Enter the employee ID: 102

The bonus amount to be paid for Lex De Haan is RM 850.00

PL/SQL procedure successfully completed

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

Web Database Development Step By Step

Authors: Jim Buyens

1st Edition

0735609667, 978-0735609662

More Books

Students also viewed these Databases questions