I want to insert the last updated row into a new table using a trigger?
How to fetch that row if any of the column (value) from that table has been updated or changed?
I am using this code:
CREATE TRIGGER database.tbl1_AFTER_UPDATE AFTER UPDATE ON tbl1 FOR EACH ROW BEGIN INSERT INTO tbl2 (c1,c2,c3) SELECT c1,c2,c3 from tbl1; END
But this is inserting all the rows from
tbl2. I want only the updated rows to be inserted into tbl2.
How can I do it?