I’ve a table with 48 columns. So it’s almost impossible (or let it be) to write a trigger like
CREATE TRIGGER tbl_trigger_update
AFTER update ON tbl1
FOR EACH ROW
update tbl2 set v1=NEW.v1, v2=NEW.v2, ... v48=NEW.v48 where id=old.id
but I dont want to write something like above.
I want to fire a trigger on update/insert on tbl1 to copy/update rows to tbl2
How to solve this issue ?
You can do something with the
insert ... selectsyntax. This is the docs of the statement.