Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL SELECT format
Message
From
31/01/2007 13:06:46
 
 
To
31/01/2007 10:51:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01190908
Message ID:
01191009
Views:
8
>should the select begin with the parent or the greatgrandchild table, or doesn't it matter? IE
>
>select * from parent ;
>inner join child on ... ;
>inner join grandchild on ... ;
>inner join greatgrandchild on ... ;
>where somecondition
>
>or
>
>select * from greatgrandchild ;
>inner join grandchild on ... ;
>inner join child on ... ;
>inner join parent on ... ;
>where somecondition
>
>Is this a matter of form or is there a significant difference? Is one preferred as a best practice?

If you're doing only inner joins, the order doesn't matter. As Naomi said, the engine will decide the best order to perform the joins.

When outer joins are involved, the order is significant as it may change the results.

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform