The GETLENGTH function gets the length of a specified LOB. The length returned is either in bytes or characters.
The length also includes zero-byte fillers and spaces that are generated by previous operations, such as WRITE. The length of an empty internal LOB is 0.
Syntax
DBMS_LOB.GETLENGTH (
lob_loc IN BLOB
)
RETURN NUMBER;
DBMS_LOB.GETLENGTH (
lob_loc IN CLOB CHARACTER SET ANY_CS
)
RETURN NUMBER;
Parameters
| Parameter | Description |
|---|---|
| lob_loc | The locator of the LOB. For more information, see Usage notes. |
Return values
The length of the LOB (in bytes or characters) is returned, which is an integer. If the input LOB is NULL, or the lob_loc specified is NULL, NULL is returned.
Exceptions
| Exception | Description |
|---|---|
| BUFFERING_ENABLED | The operation cannot be performed because LOB buffering is enabled. |