0
I have a Rigger that after being inserted a new user in the table tFunctioning I must fill another table tPlanoSaude with the data of the employee.
employee table
table Health Plan
Code of the Trigges
CREATE OR REPLACE TRIGGER INSERTFUNCIONARIO
BEFORE INSERT ON tfuncionario
BEGIN
INSERT INTO tPlanoSaude VALUES(
:old.TFUNCIONARIO.MATRICULA,
:old.TFUNCIONARIO.NOME);
END;
Error message:
Include the FOR EACH ROW in the line below the BEFORE.
– Motta
Perfect. working!
– alexjosesilva
CREATE OR REPLACE TRIGGER INSERTFUNCIONARIO BEFORE INSERT ON tfuncionario FOR EACH ROW BEGIN INSERT INTO tPlanoSaude VALUES(:new.matricula,:new.MATRICULA); END;
– alexjosesilva
added the reserved words :new. before the columns for which I want to recover the value
– alexjosesilva