Subject | Re: Help with triggers... |
---|---|
Author | Adam |
Post date | 2007-08-03T00:37:43Z |
--- In firebird-support@yahoogroups.com, Allysson Costa
<allcostaes@...> wrote:
Any version:
IF ((OLD.COLUMN <> NEW.COLUMN) OR
(OLD.COLUMN IS NULL AND NEW.COLUMN IS NOT NULL) OR
(OLD.COLUMN IS NOT NULL AND NEW.COLUMN IS NULL)) THEN ...
Firebird 2 or newer:
IF (OLD.COLUMN IS DISTINCT FROM NEW.COLUMN) THEN ...
Adam
<allcostaes@...> wrote:
>trigger.
> I found a common solution to previous problem.
>
> But I don't know how to use it.
>
> Then, my question is:
> What is correct way to use "IF UPDATE(colunm)" function inside
Any version:
IF ((OLD.COLUMN <> NEW.COLUMN) OR
(OLD.COLUMN IS NULL AND NEW.COLUMN IS NOT NULL) OR
(OLD.COLUMN IS NOT NULL AND NEW.COLUMN IS NULL)) THEN ...
Firebird 2 or newer:
IF (OLD.COLUMN IS DISTINCT FROM NEW.COLUMN) THEN ...
Adam