Denny Cherry’s Back to Basic Series
From time to time, Mr Denny (SQL Server with Mr Denny) is posting basic but very useful SQL codes that deal with SQL Server fundamentals. This is such a great feat for an expert such as Mr SQL Server himself, Denny Cherry. I am sure this “Back to Basic Series” will benefit lots of the folks at the DBA world.
Back to Basic: CTE
“CTEs (Common Table Expressions) are one of the very cool features introduced in SQL Server 2005. In there simplest most common form, think of them as a temporary single use view who’s context is only within the command which follows them directly. The syntax of a CTE is very basic.”