Subject Re: [IBO] Current time
Author Helen Borrie
At 06:19 AM 10/05/2006, you wrote:
>Hi,
>
>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?

alter mytable
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