apache > db
Apache DB Project
 
Font size:      

FOR UPDATE clause

FOR UPDATE clause

The FOR UPDATE clause is an optional part of a SELECT statement. The FOR UPDATE clause specifies whether the ResultSet of a simple SELECT statement that meets the requirements for a cursor is updatable or not. For more information about updatability, see Requirements for Updatable Cursors.

Syntax

FOR
{
    READ ONLY | FETCH ONLY |
    UPDATE [ OF Simple-column-Name [ , Simple-column-Name]* ]
}

Simple-column-Name refers to the names visible for the table specified in the FROM clause of the underlying query.

Cursors are read-only by default. For a cursor to be updatable, you must specify FOR UPDATE.

The optimizer is able to use an index even if the column in the index is being updated. For more information about how indexes affect cursors, see Tuning Derby.

Examples

SELECT RECEIVED, SOURCE, SUBJECT, NOTE_TEXT FROM SAMP.IN_TRAY FOR UPDATE;


Previous Page
Next Page
Table of Contents
Index