whenever an employee is given a raise,the managers salary must be increased to be atleast as much?
Here is a query of creating a trigger.We have created three tables.
Emp(eid,ename,age,salary) Works(eid,did) Dept(did,managerid) create trigger GiveRaise after update on Emp for each row begin update Emp M set M.salary=new.salary where M.salary<new.salary and M.eid in(select d.managerid from Emp e,Works w,Dept d where e.eid=new.eid and E.eid=w.eid and w.did=d.did); end
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.