1. The LONG data type stores variable-length strings with a maximum length limit of 2 GB.
2. For text that exceeds a certain length, the LONG type can only be used for storage. Many objects in the data dictionary are defined as LONG.
1. The LONG data type stores variable-length strings with a maximum length limit of 2 GB.
2. For text that exceeds a certain length, the LONG type can only be used for storage. Many objects in the data dictionary are defined as LONG.
3. The LONG type is mainly used for LONG string data that does not need to be searched for strings. To search for characters, the varchar2 type is required.
4. Many tools, including SQL * Plus, are difficult to process LONG data types.
5. Use of the LONG data type depends on the disk size.
SQL statements that can operate on LONG:
1. Select statement
2. SET statement in Update statement
3. VALUES statement in the Insert statement
Restrictions:
1. A table can only contain one LONG column.
2. LONG Columns cannot be indexed.
3. tables containing LONG Columns cannot be clustered.
4. Values of LONG Columns cannot be inserted into another table in SQL * Plus, such as insert... Select.
5. You cannot create LONG columns by querying other tables in SQL * Plus, for example, create table as select.
6. Constraints (except NULL, not null, and DEFAULT) cannot be added to LONG columns. For example, a KEY column cannot be of the LONG data type.
7. LONG Columns cannot be used in the following clauses of Select: where, group by, order by, and select statements with distinct.
8. LONG Columns cannot be used for distributed query.
9. PL/SQL process block variables cannot be defined as LONG.
10. LONG Columns cannot be changed by SQL functions, such as substr and instr.