>>-+---------------------------------------+--fullselect--------> | .-,--------------------------. | | V | | '-WITH-----common-table-expression---+--' >----+-----------------+--+--------------------+----------------> '-order-by-clause-' '-fetch-first-clause-' >----*--+---------------------+--*--+---------------------+--*-->< +-read-only-clause----+ '-optimize-for-clause-' | (1) | '-update-clause-------'
Notes:
The select-statement is the form of a query that can be directly specified in a DECLARE CURSOR statement, or prepared and then referenced in a DECLARE CURSOR statement. It can also be issued through the use of dynamic SQL statements using the command line processor (or similar tools), causing a result table to be displayed on the user's screen. In either case, the table specified by a select-statement is the result of the fullselect.
A select-statement that references a nickname cannot be specified directly in the DECLARE CURSOR statement.