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: WHERE IN query

Re: WHERE IN query

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 22 Apr 1999 12:11:56 GMT
Message-ID: <372211eb.4740376@192.86.155.100>


A copy of this was sent to "Joerg Leute" <leute_at_itdesign.de> (if that email address didn't require changing) On Thu, 22 Apr 1999 11:56:48 +0200, you wrote:

>Hi everybody
>
>Isn't it possible to extend a WHERE IN query over 2 columns - first column
>is number and second is char) like
>
>SELECT * FROM TABLE1 WHERE (ID, NAME) IN (SELECT ID_2, NAME_2 FROM TABLE2)
>

Yes:

SQL> select ename from emp
  2 where ( ename, empno ) in ( select ename, empno from emp

  3                               where ename like '%A%' )
  4 /

ENAME



ALLEN
WARD
MARTIN
BLAKE
CLARK
ADAMS
JAMES its "where ( set ) in ( select <set> from t)" and set can have 1 or more columns

>Thanks for your help
>
>Joerg
>
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Apr 22 1999 - 07:11:56 CDT

Original text of this message

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