Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Tieing table together

Tieing table together

From: Brian Tkatch <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK>
Date: Fri, 08 Dec 2000 01:20:37 GMT
Message-ID: <3a3032fc.1470406593@news.alt.net>

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



Id
A_Id
Name

D



A_Id
B_Id
Name

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

Original text of this message

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