Question: TASK 1 Create a PL/SQL block that uses an explicit record-based cursor with two parameters . Declare a cursor that accepts two parameters job id

TASK 1

Create a PL/SQL block that uses an explicit record-based cursor with two parameters.

  1. Declare a cursor that accepts two parameters job id and minimum salary. The cursor retrieves underpaid employees whose salaries are lower than minimum salary working as job id.
  2. To list underpaid employees working as Accountant, open the cursor and pass the job id and the minimum salary as below:

OPEN c_employee('FI_ACCOUNT', 8000); --- Accountant

  1. Fetch each row in the cursor and show the employees information and close the cursor.
  2. To list underpaid employees working as Administration Assistant, open the cursor for the second time but with different arguments as below:

OPEN c_employee('AD_ASST', 5000); --- Administration Assistant

  1. Fetch the data, print out employees information, and close the cursor.
  2. Format the output to be similar to the below.

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!