Data Types

Description: Oracle offers many data types in character, numeric, and date/time groups.

Character Data Types
 
CHAR(size) Maximum size OF 2000 bytes.
nchar(size) Maximum size OF 2000 bytes.
nvarchar2(size) Maximum size OF 4000 bytes
VARCHAR2(size) Maximum size OF 4000 bytes
LONG Maximum size OF 2GB
RAW Maximum size OF 2000 bytes
LONG RAW Maximum size OF 2GB
 
 
Numeric Data Types
 
NUMBER(p,s) Precision can RANGE FROM 1 TO 38.
numeric(p,s) Precision can RANGE FROM 1 TO 38
dec(p,s) Precision can RANGE FROM 1 TO 38
DECIMAL(p,s) Precision can RANGE FROM 1 TO 38integer
int
SMALLINT
REAL
double precision
 
 
DATE/TIME Data Types
 
DATE A DATE BETWEEN Jan 1, 4712 BC AND Dec 31, 9999 AD. A DATE BETWEEN Jan 1, 4712 BC AND Dec 31, 9999 AD. A DATE BETWEEN Jan 1, 4712 BC AND Dec 31, 9999 AD.
TIMESTAMP (fractional seconds precision) fractional seconds precision must be a NUMBER BETWEEN 0 AND 9. (DEFAULT IS 6) fractional seconds precision must be a NUMBER BETWEEN 0 AND 9. (DEFAULT IS 6) fractional seconds precision must be a NUMBER BETWEEN 0 AND 9. (DEFAULT IS 6) Includes YEAR, MONTH, DAY, HOUR, MINUTE, AND seconds.
TIMESTAMP (fractional seconds precision) WITH TIME ZONE fractional seconds precision must be a NUMBER BETWEEN 0 AND 9. (DEFAULT IS 6) fractional seconds precision must be a NUMBER BETWEEN 0 AND 9. (DEFAULT IS 6) fractional seconds precision must be a NUMBER BETWEEN 0 AND 9. (DEFAULT IS 6) Includes YEAR, MONTH, DAY, HOUR, MINUTE, AND seconds; WITH a TIME ZONE displacement VALUE.
TIMESTAMP (fractional seconds precision) WITH local TIME ZONE fractional seconds precision must be a NUMBER BETWEEN 0 AND 9. (DEFAULT IS 6) fractional seconds precision must be a NUMBER BETWEEN 0 AND 9. (DEFAULT IS 6) fractional seconds precision must be a NUMBER BETWEEN 0 AND 9. (DEFAULT IS 6) Includes YEAR, MONTH, DAY, HOUR, MINUTE, AND seconds; WITH a TIME ZONE expressed AS the session TIME ZONE.
INTERVAL YEAR (YEAR precision) TO MONTH YEAR precision IS the NUMBER OF digits IN the YEAR. (DEFAULT IS 2)
 
 
 
Large Object (LOB) Datatypes
 
bfile Maximum file size OF 4GB.
blob Store up TO 4GB OF binary data.
clob Store up TO 4GB OF character data.
nclob Store up TO 4GB OF character text data.
 
INTERVAL DAY
(DAY precision)
TO SECOND (fractional seconds precision) DAY precision must be a NUMBER BETWEEN 0 AND 9. (DEFAULT IS 2)
fractional seconds precision must be a NUMBER BETWEEN 0 AND 9. (DEFAULT IS 6)

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.