Oracle8i Application Developer's Guide - Large Objects (LOBs) Release 2 (8.1.6) Part Number A76940-01 |
|
Internal Persistent LOBs, 39 of 42
See:
"Use Case Model: Internal Persistent LOBs Basic Operations", for all basic operations of Internal Persistent LOBs. |
This procedure describes how to UPDATE a LOB with EMPTY_CLOB() or EMPTY_BLOB().
Before you write data to an internal LOB
, make the LOB
column non-null; that is, the LOB column must contain a locator that points to an empty or populated LOB
value. You can initialize a BLOB
column's value by using the function EMPTY_BLOB
() as a default predicate. Similarly, a CLOB
or NCLOB
column's value can be initialized by using the function EMPTY_CLOB
().
You can also initialize a LOB column with a character or raw string less than 4,000 bytes in size. For example:
UPDATE Multimedia_tab SET story = 'This is a One Line Story' WHERE clip_id = 2;
You can perform this initialization during CREATE
TABLE
(see "CREATE a Table Containing One or More LOB Columns") or, as in this case, by means of an INSERT
.
Use the following syntax reference:
The following example shows a series of updates via the EMPTY_CLOB operation to different data types of the first clip:
The example is provided in SQL and applies to all the programmatic environments:
UPDATE Multimedia_tab SET Story = EMPTY_CLOB() WHERE Clip_ID = 1; UPDATE Multimedia_tab SET FLSub = EMPTY_CLOB() WHERE Clip_ID = 1; UPDATE multimedia_tab SET Sound = EMPTY_BLOB() WHERE Clip_ID = 1;
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|