Home | Previous Page | Next Page   Data Manipulation > Using Smart Large Objects > Modifying a Smart Large Object >

Updating a Smart Large Object

A smart large object has two parts: its LO handle and its data in the sbspace. You can update either of these parts.

The UPDATE statement can store a new LO handle in a CLOB, BLOB, or opaque-type column. For the steps to update a column, see Storing an LO Handle.

To update an LO handle
  1. Update the column with a new smart large object.

    Overwrite the existing LO handle in the column with the LO handle for the new smart large object.

  2. Store an additional reference to an existing smart large object.

    Multiple columns can reference the same smart large object on disk. You can overwrite an existing LO handle in the column with the LO handle for an existing smart large object. Both columns now reference the same smart large object.

To update the data of an existing smart large object
  1. Use the SELECT statement to obtain the LO handle that identifies the location of the data.

    For more information, see Selecting the LO Handle.

  2. Open the smart large object to obtain an LO file descriptor.

    For more information, see Opening a Smart Large Object.

  3. Read data from and write data to the open smart large object.

    For more information, see Reading Data from a Smart Large Object and Writing Data to a Smart Large Object.

  4. Close the smart large object.

    For more information, see Freeing a Smart Large Object.

Important:
To update data of an existing smart large object, you do not need to use the UPDATE statement to update the CLOB, BLOB, or opaque-type column. The LO handle in the column does not need to change if you modify only the smart-large-object data.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]