RuthO
4Penny.net
Points: 7933

9/26/2011 1:51:01 PM

SQL CTE Example

* This article, and all our great SQL (General) documentation, Is available on the SQL (General) menu

A common table expression (CTE) can be thought of as a temporary result set that is defined within the execution scope of a single SELECT, INSERT, UPDATE, DELETE, or CREATE VIEW statement. A CTE is similar to a derived table in that it is not stored as an object and lasts only for the duration of the query. Unlike a derived table, a CTE can be self-referencing and can be referenced multiple times in the same query

This code example is a short 'get started' piece of code designed to help with the syntax

4Penny.net
Version: Unknown or N/A
Section: .NET Development
Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3