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

Home -> Community -> Usenet -> c.d.o.server -> Re: Select statement question

Re: Select statement question

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sat, 06 Feb 1999 14:35:56 GMT
Message-ID: <36c45329.4872476@192.86.155.100>


A copy of this was sent to kshave_at_health.gov.mb.ca (if that email address didn't require changing) On Fri, 05 Feb 1999 19:41:26 GMT, you wrote:

>Is it possible to use column aliases in equation operations in the WHERE
>clause of a SELECT statement?
>
>For example, if I have this table ...
>TABLE t1
>id NUMBER,
>name VARCHAR2(20)
>
>can do this ...
>SELECT id myid,name
>FROM t1
>where myid = 6;
>
>I know this syntax doesn't work, but is there some syntax that does?
>

inline views are useful for doing this:

SQL> l
  1 select * from ( select ename x from emp )   2* where x = 'KING'
SQL> / X



KING
>-Keith
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
 

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  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Sat Feb 06 1999 - 08:35:56 CST

Original text of this message

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