Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 Define a cursor to display employees' last name and employee number along with their manager's last name and manager number. Use Self Join

image text in transcribed

Question 1 Define a cursor to display employees' last name and employee number along with their manager's last name and manager number. Use Self Join techniques to write this SELECT statement Loop this cursor and fetch it... While you are fetching each record, Check each record and do below updates. IF employee's manager id is 102 then update employee table to change commission_pct column to 0.5 -IF employee's manager id is 103 then update employee table to change commission_pct column to 0.7 -IF employee's manager id is 124 then update employee table to change commission_pct column to 0.9 -For Everybody else then update employee table to change commission_pct column to 0.8 Close the cursor and end the program. Test your code... Once you execute your code make sure all updates went OK and Execute SELECT FROM Employees to show me latest commission_pct Share with me the screen shot of Employees table records after your PL/SQL code run

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

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions