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: Inline Views

Re: Inline Views

From: Keith D Gregory <keith_at_inconcert.com>
Date: Fri, 05 Feb 1999 10:29:53 -0500
Message-ID: <36BB0E71.694E21B1@inconcert.com>


sdgreenwood_at_ybs.co.uk wrote:
>
> I have never used inline views and would like to know more about
> them.

An inline view is a subquery in the FROM clause, such as:

    select USERNAME, NUM_LOGINS
    from (

            select  USERNAME, count(*) NUM_LOGINS
            from    LOGINS
            group   by USERNAME
            );

It could be used as above, where you want to join to another table based on an aggregate value. I've done this quite a bit for queries against transaction data.

I've also used them where I want an outer join involving three tables: TABLE3 is joined to one column of TABLE1 and one column of TABLE2. By joining (inner) TABLE1 and TABLE2 in an inline view, I was able to do the outer join against this view.

-kdg Received on Fri Feb 05 1999 - 09:29:53 CST

Original text of this message

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