Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > UPDATE >

Locking Considerations

When a row is selected with the intent to update, the update process acquires an update lock. Update locks permit other processes to read, or share, a row that is about to be updated, but they do not allow those processes to update or delete it. Just before the update occurs, the update process promotes the shared lock to an exclusive lock. An exclusive lock prevents other processes from reading or modifying the contents of the row until the lock is released.

An update process can acquire an update lock on a row or on a page that has a shared lock from another process, but you cannot promote the update lock from shared to exclusive (and the update cannot occur) until the other process releases its lock.

If the number of rows that a single update affects is large, you can exceed the limits placed on the maximum number of simultaneous locks. If this occurs, you can reduce the number of transactions per UPDATE statement, or you can lock the page or the entire table before you execute the statement.

SET Clause

Use the SET clause to identify the columns to update and assign values to each column. The clause supports the following formats:

Read syntax diagramSkip visual syntax diagramSET Clause:
 
                                   (1)
|--SET--+-| Single-Column Format |---------------+--------------|
        |  (2)                              (3)  |
        '--------| Multiple-Column Format |------'
 
Notes:
  1. See page Single-Column Format
  2. Informix extension
  3. See page Multiple-Column Format
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]