Subject | Re: [IBO] Current time |
---|---|
Author | Helen Borrie |
Post date | 2006-05-09T22:47:34Z |
At 06:19 AM 10/05/2006, you wrote:
add last_modified timestamp;
create trigger all_mytable
active before insert or update as
begin
new.last_modified = CURRENT_TIMESTAMP;
end
Lower firebirds/IB will need 2 triggers.
This is not an IBO question. Should have been posted to firebird-support.
Helen
>Hi,alter mytable
>
>I want to maintain a field in a table with the date a record was
>created or modified.
>
>What would be the best way to do this, INSERT and UPDATE triggers?
add last_modified timestamp;
>What would such a trigger look like?Firebird 1.5 or higher:
create trigger all_mytable
active before insert or update as
begin
new.last_modified = CURRENT_TIMESTAMP;
end
Lower firebirds/IB will need 2 triggers.
This is not an IBO question. Should have been posted to firebird-support.
Helen