DB2 10.5 for Linux, UNIX, and Windows

READ procedures - Read a portion of a large object

The READ procedures provide the capability to read a portion of a large object into a buffer.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-DBMS_LOB.READ_BLOB--(--lob_loc--,--amount--,--offset--,--buffer--)-><

Read syntax diagramSkip visual syntax diagram
>>-DBMS_LOB.READ_CLOB--(--lob_loc--,--amount--,--offset--,--buffer--)-><

Parameters

lob_loc
An input argument of type BLOB(10M) or CLOB(10M) that specifies the large object locator of the large object to be read.
amount
An input or output argument of type INTEGER that specifies the number of bytes or characters to read.
offset
An input argument of type INTEGER that specifies the position to begin reading. The first byte or character is at position 1.
buffer
An output argument of type BLOB(32762) or VARCHAR(32672) that specifies the variable to receive the large object. If lob_loc is a BLOB, then buffer must be BLOB. If lob_loc is a CLOB, then buffer must be VARCHAR.

Authorization

EXECUTE privilege on the DBMS_LOB module.