cancel
Showing results for 
Search instead for 
Did you mean: 

Insert ROW-TYPE variable into table without explicitly typing all column names

aristos_kapnias
Discoverer
0 Kudos
74

Hello all,
As far as I understand triggers hold the record about to be inserted/updated as a row variable which I am able to use by referencing its parts. Example:

CREATE TRIGGER TEST_TRIGGER_VAR_UPDATE
AFTER UPDATE ON TARGET
REFERENCING NEW ROW mynewrow, OLD ROW myoldrow
FOR EACH ROW
BEGIN
INSERT INTO SAMPLE_new VALUES(:mynewrow.a, :mynewrow.b);
END;

This is unacceptable for me as I want to create triggers on 50+ tables and I cannot explicitly state all of the collections elements for all these tables.
I need sth like INSERT INTO SAMPLE_new VALUES(:mynewrow.*);
or
INSERT INTO SAMPLE_new SELECT * FROM (:mynewrow);

Thanks

Accepted Solutions (0)

Answers (0)