Oracle9i Application Developer's Guide - Large Objects (LOBs)
Release 1 (9.0.1)

Part Number A88879-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Migrating From LONGs to LOBs, 11 of 14


Summary of New Functionality Associated with the LONG-to-LOB API

OCI Functions

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.

SQL Statements

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:

PL/SQL Interface

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.

See:

Chapter 7, "Modeling and Design", "SQL Semantics Support for LOBs"


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback