Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Continuation of Message #1594531 - Use of WHERE
Message
De
22/02/2014 22:36:04
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01594922
Message ID:
01594971
Vues:
38
>There is one important problem in this code sample - the OrderDate is not prefixed with the alias. Without that we would need to check which table this column belongs to.
>My rule of thumb - prefix every column with an alias name when the query involves more than 1 table.

I don't disagree with the rule of thumb, especially with several tables. But with 2 tables (a business entity master and a child table of orders), any question about the lineage of OrderDate is more likely a problem with the person in the chair. :)

>
>And of course I wrote about the LEFT JOIN problem several years ago in the following blog post
>

"Of course" ??
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform