Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> How do I do this 2-table combined query?
I want to do a query based on two tables, t1 and t2;
t1 has the fields f1 and f2 which are codes, and of course they are for different purposes no matter they have the same or different values in one record;
t2 has the codes names interpretation, fields as cd and nm
for example,
for cd "cd-001" the nm is "Charlie",
for cd "cd-002" the nm is "Marry" etc.
Now I need to interprete the following result:
select f1,f2 from t1;
And then I need to interpret the code values into names.
How can I use combined table query
select a.f1,a.f2 ...
from t1 a, t2 b
where ...
to get the intepretation at once?
Thanks. Received on Wed Aug 31 2005 - 09:24:14 CDT