Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A89852-02 |
|
DBMS_LOB , 7 of 26
This procedure erases an entire internal LOB
or part of an internal LOB
.
Note:
The length of the |
When data is erased from the middle of a LOB
, zero-byte fillers or spaces are written for BLOBs
or CLOBs
respectively.
The actual number of bytes or characters erased can differ from the number you specified in the amount
parameter if the end of the LOB
value is reached before erasing the specified number. The actual number of characters or bytes erased is returned in the amount
parameter.
DBMS_LOB.ERASE ( lob_loc IN OUT NOCOPY BLOB, amount IN OUT NOCOPY INTEGER, offset IN INTEGER := 1); DBMS_LOB.ERASE ( lob_loc IN OUT NOCOPY CLOB CHARACTER SET ANY_CS, amount IN OUT NOCOPY INTEGER, offset IN INTEGER := 1);
Exception | Description |
---|---|
VALUE_ERROR |
Any input parameter is |
INVALID_ARGVAL |
-
- |
It is not mandatory that you wrap the LOB operation inside the Open/Close APIs. If you did not open the LOB before performing the operation, the functional and domain indexes on the LOB column are updated during the call. However, if you opened the LOB before performing the operation, you must close it before you commit or rollback the transaction. When an internal LOB is closed, it updates the functional and domain indexes on the LOB column.
If you do not wrap the LOB operation inside the Open/Close API, the functional and domain indexes are updated each time you write to the LOB. This can adversely affect performance. Therefore, it is recommended that you enclose write operations to the LOB within the OPEN
or CLOSE
statement.
CREATE OR REPLACE PROCEDURE Example_4 IS lobd BLOB; amt INTEGER := 3000; BEGIN SELECT b_col INTO lobd FROM lob_table WHERE key_value = 12 FOR UPDATE; dbms_lob.erase(dest_lob, amt, 2000); COMMIT; END;
|
![]() Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|