Subject Re: [firebird-support] using timestamp type
Author Ann W. Harrison
Clay Shannon wrote:
>
> Here's what I do in a typical BeforeInsert Trigger:
> ...
> if (new.CREATED is null) then
> new.CREATED = CURRENT_TIMESTAMP;

You'd probably be better off using 'NOW' rather than CURRENT_TIMESTAMP.
CURRENT_TIMESTAMP is held constant for the duration of the operation,
so if you insert a bunch of records through a procedure or an insert ...
select, they'll all get the same value for CREATED.


Regards,


Ann