Skip to content

Glossary: SQL Beyond the Basics

CTE (common table expression)

Also written: CTE, CTEs, common table expression, WITH

A named step written after WITH before the main query, which the main query then uses like a table. It lets a long query read from top to bottom.

Where the book teaches it

Related terms

Recursive CTEDerived table