Question: PL-SQL: 1) Write an Explicit cursor to print employee id and first name for employees who earn highest eight salary (1.5 mark) Output: Employee id
PL-SQL: 1) Write an Explicit cursor to print employee id and first name for employees who earn highest eight salary (1.5 mark) Output: Employee id is : 100 , Employee Name : Steven Employee id is : 101 , Employee Name : Neena Employee id is : 102 , Employee Name : Lex Employee id is : 145 , Employee Name : John Employee id is : 146 , Employee Name : Karen Employee id is : 201 , Employee Name : Michael Employee id is : 108 , Employee Name : Nancy Employee id is : 147 , Employee Name : Alberto Statement processed. 2) print update salary of an employee based on department and commission percentage. If department is 40 increase salary by 10%. If department is 70 then 15%, if commission is more than .3% then 5% otherwise 10%. (1.5 mark) 3) Display from 5th to 10th employees in Employees table. (1.5mark) 4) Find out the name of the employee and name of the department for the employee who is managing for employee 105 (1.5 mark) 5) print change salary of employee 130 to the salary of the employee with first name Joe. If Joe is not found then take average salary of all employees. ( 1.5 mark , use exception no_data_found 6) print Change commission percentage as follows for employee with ID = 150. If salary is more than 10000 then commission is 0.4 if salary is less than 3000 then commission is 0.25%. In the remaining cases commission is 0.15%.( 1.5 mark) 7) print Increase the salary of employee 115 based on the following conditions: If experience is more than 10 years, increase salary by 20% If experience is greater than 5 years, increase salary by 10% Otherwise 5% Case by Expression: (1 mark)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
