sql - trigger writing for different column names in two different tables -
i creating trigger , understand how if columns in 2 different tables have same name. ex, write trigger if new record added in salary column table take salary table , insert salary in table b.
what don't understand how do, populate data table b if table has different column name. have table column name salary , table b column name pastsalary.
how write trigger able that?
i don't see difference between two.. insert statment reflect column want insert into:
insert tableb(pastsalary) values (:new.salary);
Comments
Post a Comment