473,322 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Number of elements in "IN operator"

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 .
Jul 19 '05 #1
3 19175
"Mikhail" <mi*************@hotmail.com> wrote in message
news:51**************************@posting.google.c om...
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 .


I beleive PL/SQL functions/operators are limited to 64K parameters in 9i
Jul 19 '05 #2
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>
Jul 19 '05 #3

"Mikhail" <mi*************@hotmail.com> wrote in message
news:51**************************@posting.google.c om...
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.
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

43
by: markryde | last post by:
Hello, I saw in some open source projects a use of "!!" in "C" code; for example: in some header file #define event_pending(v) \ (!!(v)->vcpu_info->evtchn_upcall_pending & \...
9
by: Emanuele Aina | last post by:
I have some code which does a lot of "in" on lists containing objects with no __eq__ defined. It all goes fast until I add the __lt__() method: then I have a slowdown comparable to the one I get...
6
by: Gaijinco | last post by:
I was trying to solve: acm.uva.es/p/v101/10191.html I did this code: #include <iostream> #include <fstream> #include <string> #include <vector> #include <algorithm> #include <cctype>
1
by: wartech | last post by:
Hey everyone, My objective here is to be able to sort the array that i created from a structure. When I attempt to do this I get a message stating "Failed to compare two elements in the array". ...
9
by: Tom_F | last post by:
To comp.databases.ms-access -- I just discovered, to my more than mild dismay, that some tables in my Microsoft Access 2003 database have duplicate numbers in the "AutoNumber" field. (Field...
2
by: babakandme | last post by:
Hi everybody:D I've a string that contains the name of a class. Some members told that I can use """Stringizing Operator (#)""", but the problem is here, that I have the string, & I want...
4
by: fran7 | last post by:
Hi, from help in the javascript forum I found the error in some code but need help. This bit of code works perfectly, trouble is I am writing it to a javascript function so the height needs to be in...
3
by: Mikhail | last post by:
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 .
8
by: Ratko | last post by:
Say you have something like this: for item in myList: del item Would this actually delete the item from the list or just decrement the reference counter because the item in myList is not...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.