Subject Re: [firebird-support] Re: Is there NOW functionality?
Author Daniel Rail
Hi,

Just to add to Adams good explication.

At June 18, 2006, 9:11 AM, Adam wrote:

> <velja.r@...> wrote:
>>
>> Thanks you,
>> Velja

> You may want to also consider CURRENT_TIMESTAMP.

> There is a subtle difference between that and NOW, one holds the value
> for the duration of an operation, for the other may be different for
> each record affected.

> update somelargetable
> set somefield = 'NOW';

> and

> update somelargetable
> set somefield = CURRENT_TIMESTAMP;

> May have different outcomes.

CURRENT_TIMESTAMP will be consistent for the duration of the
transaction. So in example, if the transaction was started 2 hours
ago, that will be the value of CURRENT_TIMESTAMP.

'NOW' will always be the current timestamp. So, yes the timestamp
value will be different when inserting/updating multiple rows that
will take more than one second(or is that millisecond).

--
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Consultants Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)