Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Select statement question
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
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA
--
http://govt.us.oracle.com/ -- downloadable utilities
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
![]() |
![]() |