Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: IDs in IN clause

Re: IDs in IN clause

From: <sybrandb_at_yahoo.com>
Date: 12 Jul 2006 02:36:21 -0700
Message-ID: <1152696981.232925.202060@b28g2000cwb.googlegroups.com>

Robert Wehofer wrote:
> Hello!
>
> Does anyone know, how many IDs are allowed in an Oracle IN clause (Oracle
> version = 9i)?
>
> e.g: DELETE FROM Table WHERE ID IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
> ...)
>
> What is the best way for me to delete amounts of distinct IDs? Is there a
> way without creating a temporary table to execute:
>
> DELETE FROM Table WHERE ID IN (Select ID FROM TemporaryTable)
>
> Regards,
> Robert

255, documented in the Oracle Reference manual. Please avoid asking questions you could answer easily yourself by consulting the docs.

As you don't specify the source of those id's, no one can tell what the 'best' way is.
If you think you really need to use a temporary table, just create a globabl temporary table.
However, this 'solution' stinks of sqlserver, and should be avoided, as it is sqlserver malpractice ported to Oracle.

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Wed Jul 12 2006 - 04:36:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US