Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 Oracle PL/SQL: Data Types Jump to:  
Category: >> Oracle PL/SQL >> Data Types Bookmark and Share

<< lastnext >>

Snippet Name: Data Types

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

Also see:
» IS NOT NULL
» NVL

Comment: (none)

Language:
Highlight Mode: PLSQL
Last Modified: March 07th, 2009

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)
 


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 257 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?