Long is no longer used in Oracle and only exists for compatibility with older systems.
You can only have one long field per table.
Solution: switch to CLOB or NCLOB.
Official documentation:
- Oracle Data Types
- Datatypes
Would like some openoffice developer exchange both Openfire tables as plugins the LONG type by type recommended by Oracle (LOB columns (CLOB, NCLOB, BLOB))?
LONG Datatype
LONG columns store variable-length character strings containing up to 2 gigabytes -1, or 231-1 bytes. LONG columns have many of the characteristics of VARCHAR2 columns. You can use LONG columns to store long text strings. The length of LONG values may be limited by the memory available on your computer. LONG literals are formed as described for “Text Literals”.
Do not create tables with LONG columns. Use LOB columns (CLOB, NCLOB, BLOB) instead. LONG columns are supported only for backward compatibility.
Oracle also recommends that you convert existing LONG columns to LOB columns. LOB columns are subject to far fewer restrictions thanLONG columns. Further, LOB functionality is enhanced in every release, whereas LONG functionality has been static for several releases. See the modify_col_properties clause of ALTER TABLE and TO_LOB for more information on converting LONG columns to LOB.
You can reference LONG columns in SQL statements in these places:
-
SELECTlists -
SETclauses ofUPDATEstatements -
VALUESclauses ofINSERTstatements
The use ofLONGvalues is subject to these restrictions: -
A table can contain only one
LONGcolumn. -
You cannot create an object type with a
LONGattribute. -
LONGcolumns cannot appear inWHEREclauses or in integrity constraints (except that they can appear inNULLandNOTNULLconstraints). -
LONGcolumns cannot be indexed. -
LONGdata cannot be specified in regular expressions. -
A stored function cannot return a
LONGvalue. -
You can declare a variable or argument of a PL/SQL program unit using the
LONGdatatype. However, you cannot then call the program unit from SQL. -
Within a single SQL statement, all
LONGcolumns, updated tables, and locked tables must be located on the same database. -
LONGandLONGRAWcolumns cannot be used in distributed SQL statements and cannot be replicated. -
If a table has both
LONGand LOB columns, then you cannot bind more than 4000 bytes of data to both theLONGand LOB columns in the same SQL statement. However, you can bind more than 4000 bytes of data to either theLONGor the LOB column.
In addition,LONGcolumns cannot appear in these parts of SQL statements: -
GROUPBYclauses,ORDERBYclauses, orCONNECTBYclauses or with theDISTINCToperator inSELECTstatements -
The
UNIQUEoperator of aSELECTstatement -
The column list of a
CREATECLUSTERstatement -
The
CLUSTERclause of aCREATEMATERIALIZEDVIEWstatement -
SQL built-in functions, expressions, or conditions
-
SELECTlists of queries containingGROUPBYclauses -
SELECTlists of subqueries or queries combined by theUNION,INTERSECT, orMINUSset operators -
SELECTlists ofCREATETABLE…ASSELECTstatements -
ALTERTABLE…MOVEstatements -
SELECTlists in subqueries inINSERTstatements
Triggers can use theLONGdatatype in the following manner: -
A SQL statement within a trigger can insert data into a
LONGcolumn. -
If data from a
LONGcolumn can be converted to a constrained datatype (such asCHARandVARCHAR2), then aLONGcolumn can be referenced in a SQL statement within a trigger. -
Variables in triggers cannot be declared using the
LONGdatatype. -
:
NEWand :OLDcannot be used withLONGcolumns.
You can use Oracle Call Interface functions to retrieve a portion of aLONGvalue from the database.
See Also:
Oracle Call Interface Programmer’s Guide
*Source: Datatypes *
It may be that one of the reasons not to store all the messages in Openfire, is this.