IBM Books

SQL Reference


select-statement

>>-+---------------------------------------+--fullselect-------->
   |       .-,--------------------------.  |
   |       V                            |  |
   '-WITH-----common-table-expression---+--'
 
>----+-----------------+--+--------------------+---------------->
     '-order-by-clause-'  '-fetch-first-clause-'
 
>----*--+---------------------+--*--+---------------------+--*--><
        +-read-only-clause----+     '-optimize-for-clause-'
        |               (1)   |
        '-update-clause-------'
 

Notes:

  1. The update-clause and the order-by-clause cannot both be specified in the same select-statement.

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.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]