Home » SQL & PL/SQL » SQL & PL/SQL » IN function
IN function [message #217273] Thu, 01 February 2007 07:04 Go to next message
matpj
Messages: 115
Registered: March 2006
Location: London, UK
Senior Member

hi all,
can anyone tell me if there is a limit to the number of arguments you can insert in an IN statement?

e.g. WHERE PROJECTID IN ('100', '200', '300',....)
Re: IN function [message #217275 is a reply to message #217273] Thu, 01 February 2007 07:15 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Check here.
Re: IN function [message #217276 is a reply to message #217275] Thu, 01 February 2007 07:22 Go to previous messageGo to next message
matpj
Messages: 115
Registered: March 2006
Location: London, UK
Senior Member

hmm.. thanks for that.
so that says 1000

how about LIKE.

I have tried searching but cannot find anything.
I'm sure one of those two IN or LIKE has a limit


Re: IN function [message #217277 is a reply to message #217276] Thu, 01 February 2007 07:47 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
LIKE has only 1 parameter.
Quote:
I'm sure one of those two IN or LIKE has a limit

1000 IS a limit!
Re: IN function [message #217306 is a reply to message #217273] Thu, 01 February 2007 10:41 Go to previous message
Bill B
Messages: 1484
Registered: December 2004
Senior Member
actually there is no limit on the in clause if you use it right. Instead of

where x in (1,2,3,4)

you have a table with your parameters in it, then simply do the following and there is no limit on the number of items in the other table.


where x in (select my_col from param_table)
Previous Topic: Get Next ID
Next Topic: dbms_metadata.get_ddl introduces a newline in the ddl
Goto Forum:
  


Current Time: Sat Dec 10 12:57:10 CST 2016

Total time taken to generate the page: 0.04650 seconds