Subject | Re: [firebird-support] Assigning Timestamp as a default |
---|---|
Author | Helen Borrie |
Post date | 2004-09-26T04:23:58Z |
At 09:09 PM 25/09/2004 -0700, you wrote:
You know that defaults work only on inserts and only if the column is not
passed in the insert statement? If you want to timestamp a row every time
it is accessed, use triggers.
./heLen
>Hi,or default CAST ('NOW' AS TIMESTAMP) not null
>
>I would like to assign the current date and time to a
>field as a default. What is the system call that would
>return the date and time? ...:
>
>create table test_tb
>(
>c1 integer not null,
>c2 timestamp default CURRENT_TIMESTAMP not null
>)
You know that defaults work only on inserts and only if the column is not
passed in the insert statement? If you want to timestamp a row every time
it is accessed, use triggers.
./heLen