Jump to content

Common table expression

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 213.202.114.143 (talk) at 08:35, 3 July 2006 (Sort key). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A Common Table Expression (in SQL) is a temporary named result set, derived from a simple query and defined within the execution scope of a SELECT, INSERT, UPDATE, or DELETE statement.

CTE can be thought of as an alternatives to derived tables (subquery), views, and inline user-defined functions.