Nested Table Expressions

A nested table expression is a special kind of subquery. This subquery is used in the FROM clause of an SQL statement. Nested table expressions will create logical temporary tables that are known only in the SQL statement that defines them. They may or may not result in a materialized local table being created as the SQL may be merged with the outer SQL statement.

These subqueries can be considered temporary views, and are also sometimes referred to as inline views. You can use nested table expressions to select from a grouped table or to obtain the same results that you expect from a view.

Consider the problem of obtaining the maximum average score for the DB2 Certification program exams. To gather this result, you must ...

Get DB2® Universal Database for OS/390® Version 7.1 Certification Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.