< Oracle Database
Cette section est vide, pas assez détaillée ou incomplète.
Syntaxe
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
Exemple
Références
Cet article est issu de Wikibooks. Le texte est sous licence Creative Commons – Attribution – Partage à l’identique. Des conditions supplémentaires peuvent s’appliquer aux fichiers multimédias.