Oracle Data Type, oracle

Source: Internet
Author: User

Oracle Data Type, oracle

The core of the Oracle database is a table. The common data types used by columns in the table are as follows:
CHAR (length)
Stores fixed-length strings. The length parameter specifies the length. If the length of the stored string is smaller than the length, fill it with spaces.
The default length is 1 and cannot exceed 2000 bytes.
VARCHAR2 (length)
Stores variable-length strings. Length specifies the maximum length of the string. The default length is 1, and the maximum length is 4000 characters.
NUMBER (p, s)
It can store both floating-point numbers and integers. p indicates the maximum number of digits (if it is a decimal place, it includes an integer part and a decimal part ).
And decimal point, p is 38 by default), s is the number of decimal places.
DATE
The storage date and time. It stores the epoch, four-digit year, month, day, hour, minute, and second.
TIMESTAMP
It not only stores the date's year, month, day, hour, minute, and second, but also contains the time zone.
CLOB
Store large texts, such as unstructured XML documents
BLOB
Stores binary objects, such as shapes, videos, and sounds.

Example:

Actual storage of numbers entered in the format
NUMBER 1234.567 1234.567
NUMBER (6, 2) 123.4567 123.46
NUMBER (12345.67) the input NUMBER exceeds the specified precision, and the database cannot store
 

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.