Question: Question 1 : Create a PL / SQL Procedure Using the HR . EMPLOYEES Table Objective: The purpose of this assignment is to develop your

Question 1: Create a PL/SQL Procedure Using the HR.EMPLOYEES Table
Objective:
The purpose of this assignment is to develop your skills in writing PL/SQL procedures in Oracle. You
will create a procedure that allows the user to update the salary of an employee based on their
employee ID and current performance rating.
Requirements:
Procedure Name: UPDATE_EMPLOYEE_SALARY
Procedure Inputs:
P_EMPLOYEE_ID (NUMBER)- the ID of the employee whose salary needs to be
updated.
P_PERFORMANCE_RATING (NUMBER)- the performance rating of the employee (a
value between 1 to 5, where 5 is the highest).
Procedure Logic:
If the P_PERFORMANCE_RATING is 5, increase the salary by 10%.
If the P_PERFORMANCE_RATING is 4, increase the salary by 7%.
If the P_PERFORMANCE_RATING is 3, increase the salary by 5%.
If the P_PERFORMANCE_RATING is 2, increase the salary by 3%.
If the P_PERFORMANCE_RATING is 1, no salary increase.
Update:
The procedure should update the SALARY field in the EMPLOYEES table for the
specified employee.
Output:
After a successful update, display a message: "Salary updated successfully for
Employee ID: [P_EMPLOYEE_ID]".
If no update occurs (e.g., invalid employee ID or rating), display an appropriate error
message.
Hints:
You can use the EMPLOYEES table in the HR schema provided by Oracle to test your
procedure.
Question 1 : Create a PL / SQL Procedure Using

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 Programming Questions!