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 -> Newbie SQL query

Newbie SQL query

From: P B <pbeliveau_at_avior.ca>
Date: Wed, 23 Jun 2004 09:05:48 -0400
Message-ID: <muuid0l4et7rc00nso8n1mfpq65cvrhtue@4ax.com>


If I have those two tables

TABLE_1:    	PRIMARY_KEY
		DATA_1_1
		DATA_1_2

...
TABLE_2: PRIMARY_KEY_1 referencing TABLE_1.PRIMARY_KEY PRIMARY_KEY_2 DATA_2_1 DATA_2_2
...

I want to make a query which will give me:

T1.PRIMARY_KEY T1.DATA_1_1 T1.DATA_1_2 T2.PRIMARY_KEY_2 T2.DATA_2_1 T2.DATA_2_2 if I do :

select T1.PRIMARY_KEY, T1.DATA_1_1, T1.DATA_1_2, T2.PRIMARY_KEY_2, T2.DATA_2_1, T2.DATA_2_2 from TABLE_1 T1, TABLE_2 T2 where T1.PRIMARY_KEY=T2.PRIMARY_KEY_1; It DONT work FULLY because row in TABLE_2 are not mandatory. So the query only give me result line for which I have data in TABLE_1 and corresponding data in TABLE_2

How should I make my query to show TABLE_1 data even if there no corresponding data in TABLE_2 ?

Thanks Received on Wed Jun 23 2004 - 08:05:48 CDT

Original text of this message

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