Re: Number of elements in "IN operator"

From: Walt <walt_at_boatnerd.com.invalid>
Date: Mon, 11 Aug 2003 16:27:33 -0400
Message-ID: <3F37FC35.FAF10997_at_boatnerd.com.invalid>


Mikhail wrote:

> 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 .

I've never run into a limit, but then again I don't make a habit of using long lists of literals. If you use a sub-query i.e.

 DELETE FROM emp WHERE ename IN (SELECT ename from bad_employee);

it's pretty much unlimited (i.e. how much processing power do you have, and how long are you willing to wait.) I've run queries where the sub-query that specifies values for the IN clause returns over half a million rows.

-- 
//-Walt
// Seerch-a zee veb:
// <http://www.google.com/advanced_search?hl=xx-bork>
Received on Mon Aug 11 2003 - 22:27:33 CEST

Original text of this message