January 2008
Intermediate to advanced
384 pages
8h 1m
English
A derived table is a table expression embedded in a containing statement. It has to be placed inside parentheses. It can optionally be given a correlation name, and its columns can also optionally be given names.
(<table expression>) [[AS] <correlation name> [(<derived column list>)]]
The derived table will act as if it is materialized during the duration of the statement that uses it. Notice the phrase “act as if in that last sentence. The optimizer is free to rearrange the statement in any way that it wishes, so long as the results are the same as the original statement.
Materialization is not an easy choice. If one statement is using a derived table, it might be better to integrate it into that statement. But if many statements ...
Read now
Unlock full access