OPEN (BLOB)
Go Up to Statement and Function Reference (Language Reference Guide)
Opens a previously declared Blob cursor and prepares it for reading or inserting. Available in gpre
.
OPEN [TRANSACTION name] cursor
{INTO | USING} :blob_id;
Argument | Description |
---|---|
|
Specifies the transaction under which the cursor is opened Default: The default transaction |
<cursor> |
Name of the Blob cursor |
|
Depending on Blob cursor type, use one of these:
|
<blob_id> |
Identifier for the Blob column |
Description: OPEN
prepares a previously declared cursor for reading or inserting Blob data. Depending on whether the DECLARE CURSOR
statement declares a READ
or INSERT BLOB
cursor, OPEN
obtains the value for Blob ID differently:
- For a
READ BLOB
, the <blob_id> comes from the outerTABLE
cursor. - For an
INSERT BLOB
, the <blob_id> is returned by the system.
Examples: The following embedded SQL statements declare and open a Blob cursor:
EXEC SQL
DECLARE BC CURSOR FOR
INSERT BLOB PROJ_DESC INTO PRJOECT;
EXEC SQL
OPEN BC INTO :blob_id;