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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Concatenating Strings to Field of LONG Data Type

Re: Concatenating Strings to Field of LONG Data Type

From: PaulCinVT <paulcinvt_at_aol.com>
Date: 2000/05/18
Message-ID: <20000518150707.10818.00000460@nso-fi.aol.com>#1/1

Using the LONG Datatype




Note: The LONG datatype is provided for backward compatibility with existing applications. For new applications, you should use the CLOB and NCLOB datatypes for large amounts of character data. See Oracle8i Application Developer's Guide
- Large Objects (LOBs) for information about the CLOB and NCLOB datatypes.  

--------------------------------------------------------------------------

The LONG datatype can store variable-length character data containing up to two gigabytes of information. The length of LONG values might be limited by the memory available on your computer.

You can use columns defined as LONG in SELECT lists, SET clauses of UPDATE statements, and VALUES clauses of INSERT statements. LONG columns have many of the characteristics of VARCHAR2 columns.

 Restrictions on LONG and LONG RAW Data

Although LONG (and LONG RAW; see below) columns have many uses, their use has some restrictions:

Only one LONG column is allowed per table.

LONG columns cannot be indexed.

LONG columns cannot appear in integrity constraints.

LONG columns cannot be used in WHERE, GROUP BY, ORDER BY, or CONNECT BY clauses or with the DISTINCT operator in SELECT statements.

LONG columns cannot be referenced by SQL functions (such as SUBSTR or INSTR).

LONG columns cannot be used in the SELECT list of a subquery or queries combined by set operators (UNION, UNION ALL, INTERSECT, or MINUS).

LONG columns cannot be used in SQL expressions.

LONG columns cannot be referenced when creating a table with a query (CREATE TABLE... AS SELECT...) or when inserting into a table or view with a query (INSERT INTO... SELECT...). A variable or argument of a PL/SQL program unit cannot be declared using the LONG datatype.

Variables in database triggers cannot be declared using the LONG or LONG RAW datatypes.

References to :NEW and :OLD in database triggers cannot be used with LONG or LONG RAW columns.

LONG and LONG RAW columns cannot be used in distributed SQL statements.

LONG and LONG RAW columns cannot be replicated.

Note: If you design tables containing LONG or LONG RAW data, then you should place each LONG or LONG RAW column in a table separate from any other data associated with it, rather than storing the LONG or LONG RAW column and its associated data together in the same table. You can then relate the two tables with a referential integrity constraint. This design allows SQL statements that access only the associated data to avoid reading through LONG or LONG RAW data.    

Paul in VT Received on Thu May 18 2000 - 00:00:00 CDT

Original text of this message

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