Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's the differences between nested and sub join query
Message
From
06/05/2004 21:22:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
06/05/2004 21:14:41
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00901574
Message ID:
00901802
Views:
18
I think there is a difference, from which table to which other table the relation goes. I will rewrite your queries, as I believe they will be interpreted (and therefore, as I believe they should be formatted, to make the meaning clear):
SELECT *;
  FROM a ;
    JOIN b ON a.f1 = b.f1 ;
    JOIN c ON b.f1 = c.f1
Table a is joined with b.
Table a is joined with c. Therefore, the part "on b.f1 = c.f1" is not appropriate.
SELECT *;
  FROM a ;
    JOIN b ;
      JOIN c ON b.f1 = c.f1 ;
    ON a.f1 = b.f1
Table a is joined with b.
Table b is joined with c.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform