Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Support for ordering on AS
Message
 
 
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:
01391988
Message ID:
01392548
Vues:
68
Hi David,

As you know, SQL is declarative language and as such describes only what result you want not how to get it. It's up to query processor (QP) to build appropriate execution plan. The SQL server QP is smart enough in simple cases to merge those two selects into one. As I mention in my previous post, most likely it'll result in the same query execution plan as the one w/o derived table.

>
>select * from ( select ... ) doesn't result in doubled work?
>
>>There's no second query in this case. As I mentioned in my other post, the execution plan for such query in most cases would be the same as with your suggestion.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform