If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > max no. of values in WHERE ... IN clause

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-13-04, 05:06
mihai mihai is offline
Registered User
 
Join Date: Sep 2004
Posts: 5
max no. of values in WHERE ... IN clause (JDBC)

Hi all,

can anyone tell mey what the maximum number of values (if there is any) which can be used in the WHERE ... IN clause?

ex:
.... WHERE ID IN (1, 2, 3 ... , n) ....
what is the maximum number of values which I can put between paranthesis?

10x in advance
mihai.
PS. I'm using JDBC to execute my SQL queries

Last edited by mihai; 09-13-04 at 05:32.
Reply With Quote
  #2 (permalink)  
Old 09-13-04, 08:18
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
I do not think that there is a limit to the number of expressions you can have. You do have a limit on the number of characters that an SQL statement can be, and that is 65,535 for V8.1 LUW. This will limit the number of expressions you can use.

Do not forget, you can use SELECT ... WHERE .. IN (<full-select>) the full-select can have any number of rows.

HTH

Andy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On