Oracle Data types

Source: Internet
Author: User
Tags date character set valid
oracle| Data | data type

Data type parameter description char (n) n=1 to 2000 byte fixed-length string, n-byte long, if not specified length, default to 1 bytes long (a Chinese character is 2 bytes) varchar2 (n) n=1 to 4000 bytes variable long string, specify the maximum length n, when defined,
This data type can place all the symbols in numbers, letters, and ASCII character sets (or character set criteria accepted by database systems such as EBCDIC).
If the data length does not reach the maximum n,oracle 8i automatically adjusts the length of the field based on the data size,
If you have a space before and after your data, Oracle 8i will automatically delete it. VARCHAR2 is the most common type of data.
The maximum length of the index can be 3209. Number (M,n) M=1 to 38
n=-84 to 127 a variable-length numeric column that allows 0, positive, and negative values, M is the number of digits for all valid digits, and n is the number of digits after the decimal point.
For example: Number (5,2), the maximum value for this field is 99,999, and the extra digits are intercepted if the number exceeds the bit limit.
For example: Number (5,2), but if you enter 575.316 in this field in a row of data, the value that is actually saved to the field is 575.32.
For example: Number (3,0), enter 575.316, the actual data saved is 575. Date is not valid for all legal dates from January 1, 4712 to December 31, 4712 A.D.
Oracle 8i actually holds date data internally in 7 bytes, including hours, minutes, and seconds in the definition.
The default format is Dd-mon-yy, as July-November-00 means November 7, 2000. Long no variable long character column, the maximum length limit is 2GB, used for the string search does not need to be a series of data, if you want to do character search will use the VARCHAR2 type.
Long is an older type of data that will gradually be replaced by large object data types such as BLOBs, CLOB, NCLOB, and so on. Raw (N) n=1 to 2000 variable-length binary data, you must specify the maximum length n,oracle 8i in this format to save smaller graphics files or formatted text files, such as Miceosoft Word documents.
Raw is an older type of data that will gradually be replaced by large object data types such as BLOBs, CLOB, and NCLOB. Long raw without variable-length binary data, the maximum length is 2GB. Oracle 8i uses this format to save large graphics files or formatted text files, such as Miceosoft Word documents, and audio, video, and other non text files.
In the same table can not have both long and long raw type, long raw is also an older data type, in the future will gradually be blob, CLOB, NCLOB and other large object data types replaced. Blob
Clob
NCLOB has no three large objects (lobs) to hold large graphics files or formatted text files, such as Miceosoft Word documents and audio, video, and other non text files, with a maximum length of 4GB.
There are several types of lob, depending on the type of byte you use, and Oracle 8i actually stores the data inside the database.
You can perform special operations such as read, save, write, and so on. bfile A large binary object file that is not stored outside the database, with a maximum length of 4GB.
This external LOB type is used to record changes through the database, but the data is stored outside the database.
Oracle 8i can read, query bfile, but not write.
Size is determined by the operating system.

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.