Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating temporary table
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:
01593184
Message ID:
01593233
Vues:
36
>>It doesn't have to be a temp table, it can be a CTE, e.g.
>>
>>;with cte as (select Numero from .. where ..)
>>
>>select ... JOIN cte ...
>>
>>
>>
>>You may want to try that approach as well. I'll check the execution plan screen later, currently trying to figure out weird VFP problem with debugging code.
>
>I was thinking the same thing, either a cte or a sub-query (select from.. where numero in (select numero...from .... join...)), i do not see the need of a temp table (although internally SQL is just doing that, right?)

I don't think internally SQL Server will create a temp table in case of cte. I think in this case it will be in memory. But it's a complex problem and I may need to re-read a few articles on this topic to be absolutely sure.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform