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: Joins in the from clause?

Re: Joins in the from clause?

From: Rocr <rolland.cright_at_pwgsc.gc.ca>
Date: Mon, 9 Apr 2001 14:23:52 -0400
Message-ID: <9asuno$3dm2@shark.ncr.pwgsc.gc.ca>

Here's something I came across recently in a stored proc(oracle 7.3.4 database on Unix).

    select a.1,

               b.1
    from table_a a,

             (select   c.1,
                          d.1
              from     table_c c,
                          table_d d
              where   c.2 = d.2) b

    where a.1 = b.1

Notice that the from clause has a nested select statement between the ( ). The nested select statement, in the FROM clause of the outer statement, creates an SQL table and provides it with the alias name of 'b'. Arguably, one could say that there is a join in the FROM clause.

Hope this sheds some light on the subject. (I tried to edit this to make it clearer but this is as good as I can get it, apologies).

Cheers,
rocr

"KnighThing" <KnighThing_at_netins.net> wrote in message news:slrn9d3kb1.j1m.KnighThing_at_worf.netins.net...
> Up to this point in my career I've worked almost exclusively with
> MS SQL Server and have been doing joins in the FROM clause:
>
> select *
> from t1
> join t2 on t2.id = t1.id
>
>
> Next week, however, I start a job at a site that uses Oracle, in my
> one brief, experience with Oracle I was unable to find
> a way to do joins in the FROM clause and so did them in the
> WHERE clause:
>
> select *
> from t1,t2
> where t1.id = t2.id
>
> My question is, can you do joins in the FROM clause in Oracle and if you
> can does it make any difference, performance-wise, where you do the join?
Received on Mon Apr 09 2001 - 13:23:52 CDT

Original text of this message

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