Oracle Select IN statement | Unix Linux Forums | UNIX and Linux Applications

  Go Back    


UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics.

Oracle Select IN statement

UNIX and Linux Applications


Tags
oracle, select

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-26-2009
benefactr benefactr is offline
Registered User
 
Join Date: Jul 2007
Last Activity: 4 February 2013, 4:02 PM EST
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Oracle Select IN statement

If I recall, when I used informix I could do a sql statement like:

Code:
SELECT Value from Table WHERE ID in (100,200,300);

How do I do this in Oracle? I believe I am using Oracle 10 if that matters.
Thanks.
Sponsored Links
    #2  
Old 03-26-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 18 September 2014, 3:22 PM EDT
Location: NM
Posts: 10,211
Thanks: 278
Thanked 796 Times in 743 Posts
The datatypes have to correspond to the column's definition. The syntax is okay as you have it. Your example works for numeric datatypes.


Code:
-- varchar
in ('A', 'B', 'C')

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Executing a Oracle SQL statement in a UNIX script ganga.dharan Shell Programming and Scripting 1 12-08-2008 09:44 AM
Supress ' quotes in a select statement inside Shell Script mahabunta Shell Programming and Scripting 1 12-14-2006 05:29 PM
Select entries between two dates by converting Unix timestamp in Oracle Database. amitsayshii UNIX for Advanced & Expert Users 1 08-08-2006 11:00 AM
Want to use the output of Select statement in Unix script akhilgoel9 Windows & DOS: Issues & Discussions 4 05-27-2005 09:52 AM
Pipe SQL select statement results to script houtakker UNIX for Dummies Questions & Answers 6 10-31-2003 12:20 PM



All times are GMT -4. The time now is 09:50 AM.