Subject Re: [firebird-support] Re: Insert current time and date
Author Helen Borrie
At 10:34 PM 17/01/2005 +0000, you wrote:


>I always wondered what the difference was. So obvious now :)

There is a difference, but it isn't as Alan explains it.


>Adam
>
> >
> > yes and just be aware, current_time is fixed to the start of the
>transaction
> > in which it is being used, versus 'NOW' which is fresh to the
>statement in
> > which it is being used

CURRENT_TIME is fixed to the first operation executed by the
statement. It's not related to the transaction at all. So, if a statement
updates 10,000 rows, all 10,000 rows will have exactly the same time.

'NOW' records the time when the single operation is executed. So, if a
statement updates 10,000 rows, each row will have the exact time that the
operation occurred on that row, i.e. the 10,000th row will have a later
time than the first.

./heLen