Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Tieing table together
Let's say I have four tables. Two are lookup tables, the third uses one lookup table, and the forth uses both.
A
===
Id
Name
B
===
Id
Name
C
D
To select from all the tables, I could do:
SELECT
A.Name A_Name, B.Name B_Name, C.Name C_Name, D.Name D_Name FROM A, B, C, D WHERE A.Id = C.A_Id AND A.Id = D.A_Id AND B.Id = D.B_Id;
I could also add
AND C.A_Id = D.A_Id
which is completely extra as both C and D are already tied to A, thereby forcing them to be equal. I am wondering if it helps at all or just puts extra strain on the processor.
Brian;
/
Received on Thu Dec 07 2000 - 19:20:37 CST