|Subject||RE: [firebird-support] How to avoid that a table have more than 1 row?|
|Author||Svein Erling Tysvær|
>Hello everybodyVery simple Walter. Add a PK field and then have a before insert trigger that looks something like:
>I have a control table, which could to have one row and just one row, never
>Which trigger I could to write for avoid inserts in that table if there is
>one row on them?
>Thanks in advance.
CREATE TRIGGER WalterTrigger FOR ControlTable ACTIVE BEFORE INSERT OR UPDATE POSITION 0 AS
new.PK = 1;