Creating a common table expression
Creating a common table expression saves you the overhead of creating and dropping a regular view that you need to use only once. Also, during statement preparation, Db2 does not need to access the catalog for the view, which saves you additional overhead.
About this task
Use the WITH clause to create a common table expression.
Procedure
To created a common table expression use one of the following approaches: