Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: inline view
On Wed, 26 Mar 2003 14:27:15 +0100, Hanne Iren Midttun
<hannem_at_tihlde.org> wrote:
>3)
>select * from geo_vei;
>
>GEOMETRI
>---------------------------------------
>rv6
>rv7
>
>4)
>selcet * from (select navn from metatab where kilde_id =1);
>
>NAVN
>---------------------------------------
>geo_vei
>
>In my head I tought the select 3 and 4 where the same?
>
>regards Hanne
What's inside the ( ) represents a set of data values, not the name of a table.
The outer query can filter these values, or sort them, or group them, or join them. For example, I frequently use a construction like
select * from
(
select count(*) howmany, <complicated expression 1> expr1, <complicated expression 2> expr2 ...
No need to repeat the expressions because the outer query sees only the column aliases.
John
-- Photo gallery: http://www.pbase.com/john_russell/Received on Wed Mar 26 2003 - 23:10:58 CST