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: Jim Smith <usenet01_at_ponder-stibbons.com>
Date: Fri, 2 Mar 2007 23:20:12 +0000
Message-ID: <kdwKRZnsEL6FFwKp@jimsmith.demon.co.uk>


In message <45e84bdf$0$23135$9b4e6d93_at_newsspool1.arcor-online.net>, Tobias Merler <merlin_at_gmx.net> writes
>Assume I join two tables.
>Both of these tables contain a column with name "col1". This column ist
>not he primary key.
>However this column contains different values which value is taken ?
>
>Lets see the following example:
>
>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
>

No.

The result table will look like

id col1 col2 id col1 col3
1 aaa ddd 1 zzz uuu
2 bbb eee 2 xxx vvv
3 ccc fff 3 yyy www Received on Fri Mar 02 2007 - 17:20:12 CST

Original text of this message

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