Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE:LONG-Technet documentation

RE:LONG-Technet documentation

From: Vidya Kalyanaraman <kvidya13_at_hotmail.com>
Date: Thu, 11 May 2000 15:44:28 EDT
Message-Id: <10494.105411@fatcity.com>


I am sending a copy of documentation on LONG. This is from Technet. Hope it is helpful.
Thanks
Vidya
----Cut here
LONG Datatype

LONG columns store variable length character strings containing up to 2 gigabytes, or 231-1 bytes. LONG columns have many of the characteristics of VARCHAR2 columns. You can use LONG columns to store long text strings. Oracle uses LONG columns in the data dictionary to store the text of view definitions. The length of LONG values may be limited by the memory available on your computer.

You can reference LONG columns in SQL statements in these places:

     SELECT lists
     SET clauses of UPDATE statements
     VALUES clauses of INSERT statements

The use of LONG values are subject to some restrictions:

     A table cannot contain more than one LONG column.
     LONG columns cannot appear in integrity constraints (except for NULL 
and NOT NULL constraints).
     LONG columns cannot be indexed.
     A stored function cannot return a LONG value.
     Within a single SQL statement, all LONG columns, updated tables, and 
locked tables must be located on the same database.

LONG columns cannot appear in certain parts of SQL statements:

     WHERE, GROUP BY, ORDER BY, or CONNECT BY clauses or with the DISTINCT operator in SELECT statements

     the UNIQUE clause of a SELECT statement
     the column list of a CREATE CLUSTER statement
     the CLUSTER clause of a CREATE SNAPSHOT statement
     SQL functions (such as SUBSTR or INSTR)
     expressions or conditions
     SELECT lists of queries containing GROUP BY clauses
     SELECT lists of subqueries or queries combined by set operators
     SELECT lists of CREATE TABLE ... AS SELECT statements
     SELECT lists in subqueries in INSERT statements

Triggers can use the LONG datatype in the following manner:

     A SQL statement within a trigger can insert data into a LONG column.
     If data from a LONG column can be converted to a constrained datatype 
(such as CHAR and VARCHAR2), a LONG column can be
     referenced in a SQL statement within a trigger. Note that the maximum 
length for these datatypes is 32K.
     Variables in triggers cannot be declared using the LONG datatype.
     :NEW and :OLD cannot be used with LONG columns.

You can use the Oracle Call Interface functions to retrieve a portion of a LONG value from the database. See Oracle Call Interface Programmer's Guide.



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com Received on Thu May 11 2000 - 14:44:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US