data type of oracle table

Data types supported by oracle



1.
The character type char has a fixed length of up to 2000 characters
Example: char(5) 'Xiaohan' put 'Xiaohan' in the first four characters, and add 6 spaces after it to complete 'Xiaohan'
Advantage: If you store The data is fixed length, such as ID card, it is best to use char type, char type is very fast for data with a certain length
Disadvantage: more wasted space

varchar2(20) The maximum length is 4000 characters
Example: varchar2( 10) 'Xiaohan' oracle allocates four characters, which can save space (advantage)
Disadvantage: low query efficiency

clob (character large object) character large object up to 4G



2. Number (only one number)
number range -10 38th power - 10 to the 38th power
can represent an integer or a decimal

number(5,2)
means that a decimal has 5 significant digits, and the range of 2 decimal places
is -999.99-999.99

number(5)
means a five-digit number Integer
range -99999 - 99999


3. Date type
date includes year, month, day and hour, minute and second

timestamp. This is an extension of oracle9i to date data type.


4. Picture type
blob binary data can store pictures/sounds up to 4G
for security reasons. You can put pictures and sounds in the oracle database


Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327037744&siteId=291194637