O'Reilly logo

Java™ Oracle® Database Development by David J. Gallardo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Oracle Datatypes

To store data in a database, an appropriate set of tables must first be created, with columns of the appropriate types defined. These are the basic Oracle datatypes we have to choose from:

String types 

CHAR(length)

Fixed-length character data: max limit, 2,000

VARCHAR2(length)

Variable-length string: max limit: 4,000
Numeric 

NUMBER

Float, 38-digit decimal significance: max scale, 127

NUMBER(precision)

Integer (fixed precision)

NUMBER(precision, scale)

Fixed point
Time and date 

DATE

Date and time Jan 1, 4712 BCE—Dec 31, 9999 CE; 1-second precision

TIMESTAMP

Extension of date—fractional seconds with 0- to 9-digit precision, default 6

There are a few other types, particularly BLOB (Binary Large Objects) and CLOB (Character Large Objects), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required