ODBC Server Reference Manual
CORE SQL Language
HP NonStop ODBC Server Reference Manual—429151-002
3-59
SELECT for Update
specifies that the result table is to be sorted in the same sequence as COL_1.
column-name
specifies a column in a table in the FROM clause; the sorting order of that column
is used as the sorting order of the result table rows. For example:
select col_1,col_2 from table_1 order by col_1
specifies that the result table is to be sorted in the same sequence as COL_1.
ASC or DESC
explicitly specifies whether to sort in ascending or descending order; the default is
ascending.
The actual sorting sequence used, numeric or ASCII, depends on the data type of the
column chosen by unsigned-integer or column-name.
If the SELECT statement contains a UNION clause, the ORDER BY clause must be
the last clause in the statement, as it defines the ordering of the result of that union.
SELECT for Update
The SELECT for update statement is used to associate a list of updatable columns
with a dynamic SQL statement; a cursor can then be declared for the statement. The
SELECT for update statement has the following syntax:
column-name
is the name of a column in a table specified in the FROM clause. It must be
updatable.
CORE SQL Compared With NonStop SQL/MP
The corresponding NonStop SQL/MP statement is SELECT.
SELECT [ ALL ] select-item [, select-item ] ...
[ DISTINCT ]
FROM table-reference [, table-reference ]...
[ WHERE search-condition ]
FOR UPDATE OF column-name [, column-name ] ...