Precautions for using long field type in Oracle

Source: Internet
Author: User
Instructions for use:
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. The value of the long column cannot be inserted into another table in SQL * Plus, such as inser.
Yong said:
4. The value of the long column cannot be inserted into another table in SQL * Plus, such as insert into... 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.

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.