내 트리거 :
create or replace
trigger ADD_HISTORICO
AFTER INSERT
ON ALUGUER
FOR EACH ROW
DECLARE
cod_aluguer_p NUMBER(6,0);
cod_veiculo_p NUMBER(6,0);
BEGIN
SELECT ID_ALUGUER INTO cod_aluguer_p
FROM ALUGUER;
SELECT COD_VEICULO INTO cod_veiculo_p
FROM ALUGUER;
INSERT INTO HISTORICO(ID_ENTRADA,DESCRICAO,DATA_REGISTO,NOVO_VEICULO,NOVO_ALUGUER)
VALUES(SEQ_HISTORICO.nextval,'NOVA DESCRIÇÃO','21/11/2013',cod_veiculo_p,cod_aluguer_p);
END;
을
오류 보고서 :
SQL Error:
ORA-04091: BDDAD_DL1.ALUGUER table is mutating, trigger can not read or modify
ORA-06512: at "BDDAD_DL1.ADD_HISTORICO", line 6
ORA-04088: error during execution of trigger 'BDDAD_DL1.ADD_HISTORICO' 04091. 00000 -. "Table% s% s is mutating, trigger/function may not see it"
* Cause: A trigger (or a user defined plsql function that is referenced in
this statement) attempted to look at (or modify) a table que was
in the middle of being modified by the statement Which fired it.
* Action: Rewrite the trigger (or function) so it does not read that table.
이 시간 내 주셔서 감사 읽고 추천 할 것입니다. 그것은 많은 도움이되었습니다. – Vyward