Oracle Database/Trigger
Syntaxe
modifier create or replace trigger <triggername>
before/after insert or update or delete
on <tablename>
REFERENCING NEW AS <newROW> OLD AS <oldROW>
for each row/for each statement
when (<condition>)
DECLARE
-- Déclaration des variables
BEGIN
if INSERTING then
...
end if;
if UPDATING then
...
end if;
if DELETING then
...
end if;
EXCEPTION
-- Traitement en cas d'exception
END <triggername>;
Désignations[1] :
:new
: nouvelle ligne:old
: ancienne ligne:parent
: table parente