Delete a smart large object

The following table shows the methods that can cause a smart large object to be marked for deletion.
Location of smart large object Task for deletion Method for deletion
For a CLOB or BLOB column Remove the LO handle as data for the column The DELETE statement
For an opaque-type column (for an opaque type that contains a smart large object) Remove the LO handle from the internal structure of the opaque data type and store this revised internal structure as data for the column The destroy() support function
Transient smart large object Remove the LO handle Wait for the end of the session.

The mi_lo_delete_immediate() function

Alternatively, you can mark an LO handle as invalid with the mi_lo_invalidate() function to indicate that it no longer identifies a valid smart large object.

When you delete an LO handle, the database server decrements the reference count of the smart large object that the LO handle references by one. The database server cannot delete a smart large object until it meets the following conditions:
  • A reference count of zero.

    To decrement the reference count of a smart large object, you delete an LO handle that references that smart large object.

  • No open LO file descriptors.

    When the smart large object is closed, its LO file descriptor is freed.