I have two tables TABLE1 and TABLE2 with the same structures. I need a trigger to copy a record after pasting from TABLE1 to TABLE2. What is the correct SQL for this?
this would work:
CREATE OR REPLACE TRIGGER copy_tab1_tab2_trg AFTER INSERT ON table1 FOR EACH ROW BEGIN INSERT INTO TABLE2 (col1, col2, ..., coln) VALUES (:NEW.col1, :NEW.col2, ..., :NEW.coln); END;
Source: https://habr.com/ru/post/1743193/More articles:jQuery paradigm? - jqueryJava JFileChooser getAbsoluteFile Add file extension - javaClearcase: Using Search - clearcaseEnumerated variables MVC2? - asp.net-mvcLocal PC interaction with WebApp - flashDon't dwell on HTTP 403 error - seleniumBlend 4 Beta: How to Change Image Source as Part of the Timeline - wpfHow Ant script to execute a command for each file - antGetting value from href using jQuery - jqueryะะฐะบะธะต ะฒะตััะธะธ NLog ัะฐะฑะพัะฐัั ั RTM VS2010? - visual-studio-2010All Articles