Subject RE: [firebird-support] How to avoid that a table have more than 1 row?
Author Svein Erling Tysvær
>Hello everybody
>
>I have a control table, which could to have one row and just one row, never
>more.
>
>Which trigger I could to write for avoid inserts in that table if there is
>one row on them?
>
>Thanks in advance.

Very simple Walter. Add a PK field and then have a before insert trigger that looks something like:

CREATE TRIGGER WalterTrigger FOR ControlTable ACTIVE BEFORE INSERT OR UPDATE POSITION 0 AS
begin
new.PK = 1;
end

HTH,
Set