I am creating a trigger and understand how to do this if the columns in two different tables have the same name. Ex, I write a trigger that if a new record is added in the salary column for table A to take the salary from table A and insert that as salary in table B.
What I don’t understand how to do, is populate that data into table B if that table has a different column name. So I have table A that the column name is salary and table B where the column name is pastsalary.
How do I write the trigger to be able to do that?
I don’t see the difference between the two.. Your insert statment would just reflect the column you want to insert into: