Subject Re: [firebird-support] About EXISTS predicate
Author Vishal Tiwari
Hi Helen....
Good Morning....
Thank You so much.
coz i was thinking and surprised also and glad to know that while using sub-query
there is no limitation for IN predicate.
Thanks for this information and for your valuable guidance.
Thank You!!!
Have A Nice Day.
Vishal Tiwari...

--- On Wed, 16/9/09, Helen Borrie <helebor@...> wrote:

From: Helen Borrie <helebor@...>
Subject: Re: [firebird-support] About EXISTS predicate
Date: Wednesday, 16 September, 2009, 5:16 PM


>> Just one simple doubt, Is there any limitation for EXISTS predicate too, as
>> we have for IN predicate for 1500 values ?
At 09:22 PM 16/09/2009, Thomas Steinmaurer wrote:

>No, because EXISTS is a different construct than IN, which does not
>expect a list of input values.

There is more to it, as well. ;-)

The 1499 limit applies to an IN() predicate of the form

IN (const1, const2, ....)

The limit doesn't apply when the argument is a subquery.

Note, too:

The engine actually resolves the subquery form to EXISTS(), because it is logically equivalent and is a far more economical search than IN(). However, this does *NOT* apply to a NOT IN() predicate. While NOT IN(sq) AND NOT EXISTS() are equivalent in many situations, there are some situations where they return different results. (I can't think of an example; I just know that it is proven somewhere that this can be so.)


Try the new Yahoo! India Homepage. Click here.

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