|
|
|
Junior 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?
|
|
|
|
|
Forum 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.
|
|
|
|
|
Supreme 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
|
|
|
|
|
Supreme 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
|
|
|
|
|
Supreme 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
|
|
|
|
|
Junior 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
|
|
|
|
|
Supreme 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
|
|
|
|