Introduction to the LONG function of Oracle Database

Source: Internet
Author: User

This article mainly introduces the Oracle database type LONG. We all know that the storage in the LONG data type can change the LONG string, and the maximum length limit is 2 GB. The following articles mainly describe the types of Oracle databases.

LONGxina can only store LONG texts that exceed a certain length. Many objects in the data dictionary are defined as LONG objects.

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 stored in the Oracle database. 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 in Oracle databases 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 NULL, not null, and DEFAULT cannot be added to LONG columns. For example, the 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 in Oracle databases cannot be changed by SQL functions, such as substr and instr.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.