Subject RE: [ib-support] About default values
Author Ales Kahánek
> From: Kaputnik [mailto:delphi@...]
> Exactly this is what triggers are for:
>
> excerpt from my own databases, where every table has these
> before insert and
> before update triggers:
> due to automatically adding the same fields for all tables I
> can create
> these triggers as DDL through a small utility I wrote
> automatically.....
>
> before insert:
> BEGIN
> IF (new.id IS NULL) THEN new.id=GEN_ID(GEN_something,1);
> //this is a
> tribute to IBO and its generatorlinks....
> new.SYS$CHANGED_AT='NOW';
> new.SYS$CREATED_AT='NOW';
> new.SYS$CHANGED_BY=CURRENT_USER;
> new.SYS$CREATED_BY=CURRENT_USER;
> END
>

I am no sure if I understand this well - my question is : can be in FB
somewhere defined what fields are generated for every new table (like
SYS$CHANGED_BY) or do you define these fields manualy for each table? I have
similar fields in my tables too and it would by great not to bother every
time with the same definition.

Ales Kahanek