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: Which column is taken in JOIN with multiple columns and different content ?

Re: Which column is taken in JOIN with multiple columns and different content ?

From: Jimmu <JimF_at_cccd.edu>
Date: 5 Mar 2007 12:37:43 -0800
Message-ID: <1173127063.329187.146100@j27g2000cwj.googlegroups.com>


> Select *
> FROM tablea a, tableb b
> Where a.id = b.id
>
> tablea:
>
> id col1 col2
>
> 1 aaa ddd
> 2 bbb eee
> 3 ccc fff
>
> tableb:
>
> id col1 col3
>
> 1 zzz uuu
> 2 xxx vvv
> 3 yyy www
>
> The result table will look like:
>
> id col1 col2 col3
>
> 1 ??? ddd uuu
> 2 ??? eee vvv
> 3 ??? fff www
>
> Which values will be for the questions marks ?
>

Oracle would list the columns as id, col1, col2, col3, id_1, col1_1, col2_1, col3_1 and give you values from both tables... No? Received on Mon Mar 05 2007 - 14:37:43 CST

Original text of this message

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