A table expression creates a (temporary) result table from a simple query. Clauses further refine the result table. For example, a table expression could be a query that selects all the managers from several departments and further specifies that they have over 15 years of working experience and are located at the New York branch office.
A common table expression is like a temporary view within a complex query, and can be referenced in other places within the query; for example, in place of a view, to avoid creating the view. Each use of a specific common table expression within a complex query shares the same temporary view.
Recursive use of a common table expression within a query can be used to support applications such as bill of materials (BOM), airline reservation systems, and network planning. A set of examples from a BOM application is contained in Appendix M, Recursion Example: Bill of Materials.