Subject Re: [ib-support] Using FIRST in IF EXISTS(SELECT...)
Author Claudio Valderrama C.
""csswa"" <csswa@...> wrote in message
news:a964vl+8lp1@......
>
> Will the EXISTS test be satisfied as soon as the first row matches,
> or will it only be satisfied after the server has walked through the
> whole table to get the selected subset?

It will stop just when it realizes that
- there's an immediate eof => FALSE
- something was found => TRUE

Include the simplest clause inside an EXISTS test.

C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing