-1
Create OR Replace TRIGGER filme_log
before Update OF custo On filme
Referencing New As New Old As Old
For Each Row
Begin
Insert into filme_log Values(:new.nome_original, :old.custo, :new.custo, sysdate);
END;
This is my Rigger and this is working.
Begin
Update filme set custo = 9876546 where nome_original = 'UP';
Commit;
Declare
Cursor filme_log_cur is
Select nomeF,custo_old,custo_new, data
From filme_log;
nomeF_cur filme_log.nomeF%type;
custo_old_cur filme_log.custo_old%type;
custo_new_cur filme_log.custo_new%type;
data_cur filme_log.data%type;
Begin
Open filme_log_cur;
Loop Fetch filme_log_cur into nomeF_cur, custo_old_cur, custo_new_cur, data_cur;
EXIT WHEN filme_log_cur%notfound;
DBMS_Output.put_line('Dados inseridos em Filme_log:');
DBMS_Output.put_line(nomeF_cur || ' ' ||custo_old_cur || ' ' ||custo_new_cur || ' ' || data_cur);
END LOOP;
END;
And I’m trying to run this Rigger but I can’t understand why it’s not working.
João, you are in Stack Overflow in Portuguese, please translate your question.
– Jakson Fischer
Welcome to Stackoverflow in Portuguese. As the name implies, the Official language used here is English. So, can you Please Translate your Question? If you prefer, you may also Ask this same Question in the English Stackoverflow site.
– Arthur Siqueira
Welcome to the Stackoverflow in Portuguese. As the name suggests, the official language used here is Portuguese. So, could you please translate your question? If you prefer, you can also ask the same question on Stackoverflow website in English.
– Arthur Siqueira
Which database you are using?
– Erick Luz
We are using ORACLE.
– João Cristo