Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started