Oracle9i Application Developer's Guide - Large Objects (LOBs) Release 1 (9.0.1) Part Number A88879-01 |
|
Internal Persistent LOBs, 40 of 43
See:
"Use Case Model: Internal Persistent LOBs Operations", for all Internal Persistent LOB operations. |
For information on how to UPDATE a LOB when binds of more than 4,000 bytes are involved, see the following sections in Chapter 7, "Modeling and Design":
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 "Creating 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-2001, Oracle Corporation. All Rights Reserved. |
|