Let's imagine the following scenario:
CREATE TABLE invalido (
ds_valor character varying(255)
)
CREATE TABLE email (
email character varying(255)
)
I now need a trigger
that every time I run a UPDATE
or INSERT
in the email
table it checks if the value is in the invalido
table, if it is then it should replace what would be inserted in the email
table for invalid email .