Subject | Re: Stopping indexes see through Transactions? |
---|---|
Author | Svein Erling |
Post date | 2004-03-26T16:27:32Z |
--- In firebird-support@yahoogroups.com, "johnsparrowuk" wrote:
if exists(select * from mytable where pk = :new.pk) then
exception key_viol;
works OK even if there are lots of duplicates.
Set
> before insert trigger:Since PKs are unique this should be good enough, but
> select count(*) from mytable where pk = :new.pk into :a;
> if (a > 0) then
> exception key_viol;
if exists(select * from mytable where pk = :new.pk) then
exception key_viol;
works OK even if there are lots of duplicates.
Set