The select-statement is the form of a query that you can issue in interactive SQL (using CA Datacom 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.
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 FOR n ROWS ─┘
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 FOR n ROWS ────────────────────┤ ├─ FOR ─┬─ READ ──┬── ONLY ────────────────┤ │ └─ FETCH ─┘ │ ├─ FETCH FIRST ─┬─────┬─┬─ ROW ──┬── ONLY ─┤ │ └─ n ─┘ └─ ROWS ─┘ │ └─ WITH UR ────────────────────────────────┘
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|