Common table expression
Appearance
![]() | It has been suggested that this article be merged into Hierarchical query and Talk:Common table expressions#Merge proposal. (Discuss) Proposed since February 2009. |
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.
External links