Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's the differences between nested and sub join query
Message
From
07/05/2004 05:58:43
 
 
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:
00901866
Views:
13
SELECT *;
  FROM ((a JOIN b ON a.f1 = b.f1) JOIN c ON b.f1 = c.f1)

Table a is joined with b -> result1
result1 is joined with c.

((a*b)*c)

SELECT *;
  FROM (a JOIN (b JOIN c ON b.f1 = c.f1) ON a.f1 = b.f1)
    
Table b is joined with c -> result1
a is joined with result1

(a*(b*c))
Use this rule:
on a SELECT command is the ON clause that fixed the evaluation order;
read the ON in left to right order and you can known the evaluation order.

For INNER JOIN associative rule is valid: ((a*b)*c)=(a*(b*c))
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform