I have a common database combining the situation with three tables. One table, A, is the primary table with the primary key named id. Tables B and C contain auxiliary data records and A, and each also has a column with a name idthat is a foreign key, indicating the A. id. Now, if I want all the data from A, B and C in one query, I would write:
SELECT *
FROM A
INNER JOIN B
ON B.id = A.id
INNER JOIN C
ON C.id = A.id
which of course works great.
Recently, our database administrator told us that this is inefficient in Oracle, and you also need to combine the conditions between C and B as follows:
SELECT *
FROM A
INNER JOIN B
ON B.id = A.id
INNER JOIN C
ON C.id = A.id AND C.id = B.id
, , , . , , , . : , "" , 1 035, "" - 389 ( ). .
- , ? C B . , , - .