I have a question:
If I have two tables in Oracle, say T1 and T2, and they have the following properties:
Code:
T1
c1 c2 c3
______________
| A | 1 | alpha|
| B | 2 | beta |
| C | 3 | zeta |
T2
c1 c2 c4
_____________
| B | 2 | doh |
Now my problem: I want to have a single select statement such that it returns 4 columns, namely T1.c1, T1.c2, T1.c3, T2.c4. It should return all the rows from T1.
T2.c4 should return either null or its actual value from T2 if (T1.c1 = T2.c1 AND T1.c2 = T2.c2).
So the sample output of this select statement would be:
Code:
Select ...
c1 c2 c3 c4
____________________
| A | 1 | alpha| null|
| B | 2 | beta | doh |
| C | 3 | zeta | null|
Thanks in advance!