Subject RE: [firebird-support] Can you guess the result of this query? :)
Author Alan McDonald
> Who says we don't want FB to be strict with ambiguity:
>
> create table new ( old INTEGER );
> SET TERM ^ ;
> CREATE TRIGGER NEW_BU1 FOR NEW ACTIVE BEFORE UPDATE POSITION 0 AS
> BEGIN
> select new.old from new where old.old = new.old
> into new.old;
> END^
> SET TERM ; ^
>
> INSERT INTO NEW (OLD) VALUES (1);
> update new set old = 2;
> select * from NEW;
>
> Can you guess what this query would return? 1, 2 or NULL? ;)
>
> P.S. This is only for fun. I doubt anyone would name their tables NEW or
> OLD.
>
> --
> Milan Babuskov

LOL - that's a giggle
Alan