esus
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
taa_equipe
Parameters
Name
Type
Mode
Definition
begin if (tg_op = 'INSERT') then update tb_ator_papel set qt_referencia = (qt_referencia + 1) where co_seq_ator_papel = new.co_unidade_saude; elsif (tg_op = 'DELETE') then update tb_ator_papel set qt_referencia = (qt_referencia - 1) where co_seq_ator_papel = old.co_unidade_saude; end if; return NULL; end;