Oracle9i Application Developer's Guide - Large Objects (LOBs) Release 1 (9.0.1) Part Number A88879-01 |
|
Migrating From LONGs to LOBs, 11 of 14
OCIDefineByPos()
function now accepts the following types:
So, for a LOB column, you can define a VARCHAR2 buffer and on the subsequent OCIStmtFetch()
command, you will get the buffer filled with the CLOB/BLOB data.
OCIBindByPos()
and OCIBindByName()
functions now accept buffers of up to 4 gigabytes in size.
The following new syntax has been added:
ALTER TABLE [<schema>.]<table_name> MODIFY ( <long_column_name> { CLOB | BLOB | NCLOB } [DEFAULT <default_ value> ) [LOB_storage_clause];
See "Migrating LONGs to LOBs: Using ALTER TABLE to Change LONG Column to LOB Types", for details. Changes made to the ALTER TABLE syntax are as follows:
You can now use the following PL/SQL SELECT statements:
You can also make the following assignments:
In addition, a CLOB (BLOB) can be passed as an actual parameter to a function with a formal parameter of VARCHAR2 (RAW) and vice-versa, and can call PL/SQL built-in functions on LOBs.
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|