Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Microsoft SQL Server
Versions des environnements
SQL Server:
SQL Server 2008
>Walter,
>
>Thanks for the reply.
>
>1) You're right, the ANSI format for dates is better. I have a bunch of demo examples where I should update that. Good point.
>
>2) Speaking of ANSI standard, Common Table Expressions "are" part of the ANSI-99 standard. :)
Thanks for pointing that out. How could I have missed that??
>CTEs are available in Oracle, MySQL, MS SQL (since 2005), and other DBs as well.
>
>They are functionally equivalent of derived table expressions. Some developers love them, some don't. As for readable and maintainable, that's a matter of opinion.
>Unfortunately, many online sites (and maybe even Wikipedia) refer to CTEs as "temporary named result sets". They're not result sets. It is simply a derived table subquery, placed "above" the outer query that refers to it. It's basically syntax sugar - some like it, some find it too heavy/sweet.
>
>Yes, they are not a replacement for temp tables. If one needs to store a result set and then perform many subsequent operations beyond what a derived table subquery can do, then yes, a temp table will be better.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement