Subject | Re: [firebird-support] trigger before update column name |
---|---|
Author | Anderson Farias |
Post date | 2009-04-06T15:03:34Z |
Hi,
you have to ask using something like (for each column you want to test):
if (new.column1 is distinct from old.column1) then {... if true, column1 was
modified ...}
if (new.column2 is not distinct from old.column2) then
new.column6 = current_date;
Regards,
Anderson Farias
>Is there a way, in a Before update trigger, to know the name of theNo.
>column updated?
you have to ask using something like (for each column you want to test):
if (new.column1 is distinct from old.column1) then {... if true, column1 was
modified ...}
>eg: I have a table with 6 columns , and a Before update trigger on thissomething like:
>table in order to add the Today date in the column 6.
> But I don't want the trigger add a date to the column 6 if the column 2
>is updated. Is it possible?
if (new.column2 is not distinct from old.column2) then
new.column6 = current_date;
Regards,
Anderson Farias