The select-statement is the form of a query that you can issue in interactive SQL (using Datadictionary or CA Dataquery online) or in static SQL (embedded in a DECLARE CURSOR statement in a preprocessed batch program), but not in dynamic SQL. The result table returned by a select-statement is the result of the full-select statement.
Following is the syntax diagram for the select-statement:
Note: For the syntax of the full-select statement, see Full-Select Statement. the CA Datacom/DB SQL User Guide.
FOR UPDATE OF is a CA Datacom/DB extension.
►►─ full-select statement ────────────────────────────────────────────────────► ►─┬──────────────────────────────────────────────────────┬───────────────────►◄ ├─┬───────────────────┬─┬────────────────────────────┬─┤ │ └─ ORDER BY clause ─┘ └─ optimize-read-fetch-list ─┘ │ │ ┌─ , ──────┐ │ └─ FOR UPDATE OF ─▼─ c-name ─┴─┬─────────────────────┬─┘ └─ OPTIMIZE FORnROWS ─┘
Note: OPTIMIZE FOR n ROWS is a CA Datacom/DB extension.
FOR READ/FETCH ONLY is a CA Datacom/DB extension. FETCH FIRST is a CA Datacom/DB extension.
┌─ (only one use of each clause is allowed) ───┐ ►►─▼─┬──────────────────────────────────────────┬─┴───────────────────────────►◄ ├─ OPTIMIZE FORnROWS ──────────────────────┤ ├─ FOR ─┬─ READ ──┬ ─ ONLY ────────────────┤ │ └─ FETCH ─┘ │ └─ FETCH FIRST ─┬─────┬─┬─ ROW ──┬ ─ ONLY ─┘ └─ n ─┘ └─ ROWS ─┘
|
Copyright © 2014 CA.
All rights reserved.
|
|