General information
Forum:
Microsoft SQL Server
Environment versions
SQL Server:
SQL Server 2008
>2) Speaking of ANSI standard, Common Table Expressions "are" part of the ANSI-99 standard. :)
>CTEs are available in Oracle, MySQL, MS SQL (since 2005), and other DBs as well.
Interesting - had not realized the ANSI part and not really thought about it (part being that the largest part of SQL I code still uses vfp getting no further updates)
>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.
I you know for sure from top of your head: Is that defined as well or a [commonly used] implementation detail ? Had mentally categorized it thusly, but as above: did not look en detail.
tia
thomas
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only