Subject Re: [firebird-support] How to avoid that a table have more than 1 row?
Author W O
Excellent idea, Svein!!!

Thank you very much.

Walter.



2011/8/15 Svein Erling Tysv�r <svein.erling.tysvaer@...>

> **
>
>
> >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
>
>
>


[Non-text portions of this message have been removed]