By giving us some additional data like what is structure of these two tables?
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
There is nothing to update in first table Emp_id what links both tables. So if you trying to get salary of an employee you either have already person's ID or you will find out through matching of employee name and department against Emp table. Once you get that ID then you can query salary table for that person salary
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
There is nothing to reflect in first table. In reality you do want to only update salary in salary table. If you start adding new salaries with same employee ID how do will you find what is that person actual salary from numerous records you will have?
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
There is option to use triggers, but so far I had no time to test how does it work, or execute 2 insert statements one after other with same Emp_id
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902