Thread: Setting current time on insert

Setting current time on insert

From
"Bryan White"
Date:
I have a table with a column defined as:
    Date timestamp not null default 'now'
The intent was to set the field to the data/time the row was created.  The
result seems to be that 'now' is evaluated when the table is created and all
records get this value.  Is there a way to defer evaluation of the column
default until a record is inserted?


Bryan White
ArcaMax Inc.
Yorktown VA
www.arcamax.com