what is the upper limit for predicate WHERE IN in DB2.
For example:
select salary from employee where empid in (1,2,3,4...N)
what is the upper limit for predicate WHERE IN in DB2.
For example:
select salary from employee where empid in (1,2,3,4...N)
Sometimes, if you have to ask the question, you're probably going about it the wrong way :-)
If you're worried about the limit, consider placing the values into a temporary table and then just joining the tables to get your result.
As to the specific limits, this will almost certainly vary based on which DB2 you're using: LUW, z/OS, iSeries and so on. It may also vary depending on the version. I've seen questions raised on the net about DB2 refusing more than a thousand entries but, as to which platform/version, I couldn't say.
Your best bet may be to simply test whatever version you're using to see when you hit the limit. IBM as a rule doesn't tend to publish limits like that, assuming instead that you'll do the sensible thing and avoid too many (not least because it's nearly impossible for the optimisation engine to choose a decent execution path for arbitrary values).