Chapter 5
Table expressions
This chapter focuses on named table expressions. A table expression is an expression—typically a query—that conceptually returns a table result and as such can be nested as an operand of another table expression. Recall that a table in SQL is the counterpart to a relation in relational theory. A table expression is therefore SQL’s counterpart to a relational expression. A relational expression in relational theory is an expression that returns a relation and as such can be nested as an operand of another relational expression. A named table expression is then a table expression that you assign with a name, and interact with like you do with a base table. For example, you can use named table expressions in data-manipulation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access