Softex IT Solutions Aug.2013 | Page 58

Page no:58 3. Create a view that shows number of salespeople in each city. Exercise 9 1. Write a PL/SQL block of code that first inserts a record in an ‘emp’ table. Update the salary by Rs. 2000. then check to see that the total salary does not exceed 20000. if so, undo the updates made to the salaries. 2. HRD manager has decided to raise the salary of employees by 0.15. Write a PL/SQL block to accept the employee number & update the salary of that emp. Display message based on the existence of record in employee table. 3. When any such raise in salary, a record for the same is maintained in emp_raise table. It includes the employee no, the date of raise & the actual raise. 4. Create a stored function to perform item_id check operation. Which accepts a item_id & returns a flag as per the id exist or not. 5. Application using database triggers – Create a transparent audit system for a table Client_master. The system must keep track of the records that are being deleted or updated. ?[?H?X??\?[]Y?[?Y?YYH?Y?[?[?X??]Z[? ?]H??\?][?\?H??Y[?]Y]X?H ?[?H[]H ?\]H\?[??Y?????