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
i dont want to fetch the records i just want to insert new rec in sec table's field so when i enter new Emp_id in salary table then this Emp_id should also be reflected in first table.
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?
Ya with the same Emp_id it will be ok but i wanta dd new Emp_id in sec table..
just want give more info like:
Emp table
Emp_id Emp_name
1 ABC
2 EFG
Salary table
Emp_id Salary
1 1000
2 2000
Now i want insert new rec in salary table with new Emp_id = 3 and salary = 3000;
I want Emp_id 3 should also reflect in first table as far as Emp_name concern it will null.
This is my Query.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.