Subject | Re: [firebird-support] using timestamp type |
---|---|
Author | Ann W. Harrison |
Post date | 2005-04-25T17:01:15Z |
Clay Shannon wrote:
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
>You'd probably be better off using 'NOW' rather than CURRENT_TIMESTAMP.
> Here's what I do in a typical BeforeInsert Trigger:
> ...
> if (new.CREATED is null) then
> new.CREATED = 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