Encoding format for Oracle data

Source: Internet
Author: User

I. Differences in data types between Oracle database and other databases

1, Number: formerly int, Oracle:number: Unqualified, Numbers (3): 3-bit characters, 3 bytes.  Number (6,2): 4-bit integer, 2-bit decimal, 6-byte length. English numerals are one character byte (8 bit 2 binary value)

2, Chinese characters: GB2312, zhs16gbk accounted for 2 bytes, UTF-8, Al32utf8 accounted for 3 bytes

SELECT * from v$nls_parameters t where t.parameter= 'nls_characterset ';
You can query the character set of the current database,

1, NVARCHAR2 (10): variable-length Unicode character data can be stored in 10 Chinese characters, if used to save English can only save 10 characters.

VARCHAR2 (10): variable length, non-Unicode character data, only 5 characters can be stored in English, 10

varchar holds fixed-length character data with a maximum of 2000 characters.

VARCHAR2 stores variable long character data with a maximum length of 4000 characters. , with a maximum length of 4000 characters.

VarChar is the data type provided by standard SQL.

VARCHAR2 is the unique data type provided by Oracle.

Oracle guarantees that the data type is up and backwards compatible in any version, but does not guarantee varchar. If you want a new version of the database compatible, do not use varchar, if you want to be compatible with other databases, do not use VARCHAR2.

Encoding format for Oracle data

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.