Oracle
Instructions for use:
1, Long data type is stored in variable-length strings, the maximum length limit is 2GB.
2, for more than a certain length of text, the basic only long type to store, the data dictionary many objects are defined in a long to store.
3, long type is mainly used to do not need to do a string search of the lengthy string of data, if you want to do character search will use the VARCHAR2 type.
4. Many tools, including Sql*plus, are difficult to deal with long data types.
5, LONG data type use, to be limited by the size of the disk.
SQL statement capable of manipulating LONG:
1. SELECT statement
2, the SET statement in the UPDATE statement
3. Values statements in INSERT statements
Limit:
1, a table can contain only a LONG type of column.
2, cannot index long type column.
3. A table containing a long column cannot be clustered.
4, you cannot insert the value of a long column in Sql*plus into another table, such as INSERT INTO ... select.
5, you cannot create a long type column in Sql*plus by querying other tables, such as CREATE table as SELECT.
6. You cannot add constraints to a long column (NULL, NOT NULL, except for default), such as: a keyword column (PRIMARY key) cannot be a long data type.
7. A long type column cannot be used in the following clause of a select: where, group BY, order by, and a SELECT statement with distinct. 8. A long type column cannot be used for a distributed query.
9, the variable of the PL/SQL procedure block cannot be defined as a long type.
10, the Long type column cannot be changed by the SQL function, such as: substr, InStr.