Dynamic SELECT statement Format 2 (Retrieve dynamically)
Function
The dynamic SELECT statement uses a list for retrieving data from a table.
Privileges
The owner of a list can use that list to retrieve data from tables.
Format 2: Retrieving table data using a list
(Cursor-Specification-Format-2)
SELECT {{value-expression|WRITE specification|GET_JAVA_STORED_ROUTINE_SOURCE specification}
[[AS]column-name]
[, {value-expression|WRITE specification|GET_JAVA_STORED_ROUTINE_SOURCE specification}
[[AS]column-name]]...
|*}
FROM LIST list-name
(Lock-Option)
[ {WITH {SHARE|EXCLUSIVE} LOCK
|WITHOUT LOCK [ {WAIT|NOWAIT} ]}]
[{WITH ROLLBACK|NO WAIT} ]
Operands
For cursor specification, see 2.1.2 Cursor specification: Format 2; for the lock option, see 2.19 Lock option.
Specifies that the base table to be searched is to be locked when retrieval is performed using a list.
Common rules
Notes