Use Considerations for field type Long in Oracle __oracle

Source: Internet
Author: User

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 Inser
Yong said:
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.

Related Article

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.