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