Custom Search
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




Of Interest

Be responsible for your future
Enter the USA legally!

Visa, Green Card, Citizenship, Passport
Consultation Services








Oracle » DDL » Design »

Oracle data types

     






====== DDL ======

Type Storage Range/Length Comments
----------------- ---------- -------------- -------------------
NUMBER 16 40 digit floating point
FLOAT 16 40 digit floating point
SMALLINT 16 40 digit floating point

NUMBER(a,b) varies a digits, b precision
FLOAT(a,b) varies a digits, b precision

DECIMAL 16 40 digit

INTEGER 16 40 digits
INTEGER(a) varies a digits

CHAR(a) a a=(1-255)
VARCHAR(a) varies 1 - 255
VARCHAR2(a) varies 1 - 2000

DATE 8 1/1/4217BC - 12/31/4712AD precision to minutes


LONG varies 0 - 2 GB stored inline, obsolete *
LONG RAW varies 0 - 2 GB stored inline, obsolete *

LONG VARCHAR varies 0 - 2 GB stored inline, obsolete *

BLOB varies 0 - 4 GB stored separate from table
CLOB varies 0 - 4 GB stored separate from table
NCLOB varies 0 - 4 GB stored separate from table

BFILE ?? ?? pointer to O/S file

ROWID 8 n/a row identifier within block


* Long datatypes are discouraged in Oracle 8. Note that are long and blob
datatypes are incompatible.


====== PL-SQL data types (differences) ======

Type Storage Range/Length Comments
----------------- ---------- -------------- ----------------------------
NUMERIC

VARCHAR
VARCHAR2

BLOB must be read in 32k chunks
CLOB
NCLOB








 
 
 ====== DDL ======
 
 Type                Storage     Range/Length               Comments
 -----------------   ----------  --------------             -------------------
 NUMBER              16          40 digit floating point
 FLOAT               16          40 digit floating point
 SMALLINT            16          40 digit floating point
 
 NUMBER(a,b)         varies      a digits, b precision
 FLOAT(a,b)          varies      a digits, b precision
 
 DECIMAL             16          40 digit
 
 INTEGER             16          40 digits
 INTEGER(a)          varies      a digits
 
 CHAR(a)             a           a=(1-255)
 VARCHAR(a)          varies      1 - 255
 VARCHAR2(a)         varies      1 - 2000
 
 DATE                8           1/1/4217BC - 12/31/4712AD  precision to minutes
 
 
 LONG                varies      0 - 2 GB                   stored inline, obsolete *
 LONG RAW            varies      0 - 2 GB                   stored inline, obsolete *
 
 LONG VARCHAR        varies      0 - 2 GB                   stored inline, obsolete *
 
 BLOB                varies      0 - 4 GB                   stored separate from table
 CLOB                varies      0 - 4 GB                   stored separate from table
 NCLOB               varies      0 - 4 GB                   stored separate from table
 
 BFILE               ??          ??                         pointer to O/S file
 
 ROWID               8           n/a                        row identifier within block
 
 
 * Long datatypes are discouraged in Oracle 8.  Note that are long and blob
   datatypes are incompatible.
 
 
 ====== PL-SQL data types (differences) ======
 
 Type                Storage     Range/Length    Comments
 -----------------   ----------  --------------  ----------------------------
 NUMERIC
 
 VARCHAR
 VARCHAR2
 
 BLOB                                             must be read in 32k chunks
 CLOB
 NCLOB
 
 
 
 






Oracle : Related Topics

Oracle : DDL : Creating a table
Oracle : DDL : Creating indexes
Oracle : DDL : Creating constraints
Oracle : DDL : Creating and using a sequence
Oracle : DDL : Synonyms and Database Links
Oracle : DDL : Changing a column's type or name
Oracle : DDL : Partitioned Tables
Oracle : DDL : Alter a column
Oracle : DDL : Creating an index with the nosort option

Sybase Web Site
Sybase iAnywhere Mobile Web Site
Oracle Enterprise Web Site



Get the latest Rocket99 news and tech tips via






Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2019 Stoltenbar Inc All Rights Reserved.