Re: Number of elements in "IN operator"

From: Chris O <itoys1>
Date: Tue, 12 Aug 2003 12:05:14 +1000
Message-ID: <3f384b57$0$14558$afc38c87_at_news.optusnet.com.au>


"Mikhail" <mikhailitchenko_at_hotmail.com> wrote in message news:517cd21f.0308110644.59519749_at_posting.google.com...
> Hi ,
>
> Does anybody know -how many elements could be in SQL operator IN?.
>
> As an example DELETE FROM emp WHERE ename IN (NULL, 'king',...,N);
>
> Thank you in advance .

If you are are meaning within SQL [and not PL/SQL] then as of Oracle 8.0 the limit is 1000 literal items in an IN list.

In Oracle 7 this used to be something like 250 or 255. I do not believe it has changed in Oracle 9.

A work of caution. The Oracle optimizer will use the values in this list so it may pay to study the execution plan.

I hope this helps. Received on Tue Aug 12 2003 - 04:05:14 CEST

Original text of this message