What is the meaning of the implicit join?
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


What is the meaning of the implicit join? Expand / Collapse
Author
Message
Posted 5/29/2008 10:30:08 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 6/22/2008 7:20:24 AM
Posts: 11, Visits: 40
What is the meaning of the implicit join?Please give me an example,thank you very much?
Post #11655
Posted 5/29/2008 10:53:17 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: Today @ 3:48:20 AM
Posts: 3, Visits: 45
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.


Post #11656
Posted 5/29/2008 11:20:29 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 8/11/2008 3:00:36 PM
Posts: 76, Visits: 147
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
........ ;




-SN

Post #11657
Posted 5/29/2008 11:22:25 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Yesterday @ 3:13:33 PM
Posts: 133, Visits: 359
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
Post #11658
Posted 5/29/2008 11:24:29 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Yesterday @ 3:13:33 PM
Posts: 133, Visits: 359
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
Post #11659
Posted 5/31/2008 7:40:28 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 6/22/2008 7:20:24 AM
Posts: 11, Visits: 40
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
Post #11682
Posted 6/1/2008 11:52:27 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Yesterday @ 3:13:33 PM
Posts: 133, Visits: 359
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
Post #11687
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 4:37am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.031. 7 queries. Compression Disabled.