I have a database say database_Employee with 2 tables, record and salary.
Now both tables have a column EmpId.
What I want is when I update (or add to) EmpId value in the record table, then EmpId column of salary should get the value automatically (what I added in EmpId of tb1).
I am using Visual Studio 2010, .NET Framework 4.0, SQL Server Express.
If my question is not clear, let me know.
For something like this, where you want to keep two tables values in sync, you should think about triggers. They would go into the SQL server layer. Since there don’t seem to be any business rules associated with this synchronization, triggers will make sure that the data will be copied from one table to the next, regardless of the program.