What is the meaning of the implicit join?

Database
Enthusiast

What is the meaning of the implicit join?

What is the meaning of the implicit join?Please give me an example,thank you very much?
6 REPLIES
Fan

Re: What is the meaning of the implicit join?

I think the following illustrates an implicit join:

.
.
.FROM T1
INNER JOIN T2
ON T1.A = T2.B
INNER JOINN T3
ON T2.B = T3.C
.
.
.

The above has the following implied join
INNER JOIN T3
ON T1.A = T3.C
as T1.A is already proven to be joined to T2.B

Please correct me if I'm wrong.

SN
Enthusiast

Re: What is the meaning of the implicit join?

hi,

Implicit join is where no join keyword is mentioned explicitly. for example,

select
........
from T1, T2
........ ;

is an implicit join where no JOIN keyword is mentioned explicitely and depends on the WHERE condition, if specified.

below is an exmaple for explicit join:

select
........
from T1 left outer join T2 on T1.col1=T2.col1
........ ;

Teradata Employee

Re: What is the meaning of the implicit join?

Hello,

Implicit join is the join without explicitly writting the word JOIN of any kind (inner, outer, left...). Following is the example of implicit join, it is always a cross-join:

SELECT a.col1, b.col1
FROM table1 a, table2 b;

The example given by Roddy is a simple inner join.

Regards,

Adeel
Teradata Employee

Re: What is the meaning of the implicit join?

Additionally, if you want to have implicit inner join you can write the query as follows:

SELECT a.col1, b.col1
FROM table1 a, table2 b
WHERE a.col1 = b.col1;

HTH.

Regards,

Adeel
Enthusiast

Re: What is the meaning of the implicit join?

But I found that the following example is an implicit join,and have inner join in this example,please tell me why?
select * from t1 inner join t2 on t1.a1=t2.a2,t3 where t1.b1=t3.b3
Teradata Employee

Re: What is the meaning of the implicit join?

You found pretty right.

SELECT *
FROM
t1 INNER JOIN t2
ON t1.a1=t2.a2
,t3
WHERE t1.b1=t3.b3

It uses three tables whish are t1, t2 and t3. t1 is INNER JOINED with t2, this joined table is then IMPLICITLY JOINED (comma between join condition and t3) with table t3.

Regards,

Adeel