Apache Derby – Data Types

Data Type is an attribute that specifies the type of data of any object. Each column, variable and expression has a related data type. You can use these data types while creating your tables. You can choose a data type for a table column based on your requirement.

Derby Server offers several categories of data types for your use as listed below −

Integer Numeric Data Types

Following is the list of integer numeric data types −

DATA TYPESIZEFROMTO
SMALLINT2 bytes-3276832767
INTEGER4 bytes-2,147,483,6482,147,483,647
BIGINT8 bytes-92233720368547758089223372036854775808

Approximate Numeric Data Types

Following is the list of approximate numeric data types −

DATA TYPESIZEFROMTO
REAL4 bytes-3.40E + 383.40E + 38
DOUBLE PRECISION8 bytes-1.79E + 3081.79E + 308
FLOAT-1.79E + 3081.79E + 308

Exact Numeric Data Types

Following is the list of exact numeric data types −

DATA TYPEFROMTO
DECIMAL-10^38 +110^38 -1
NUMERIC-10^38 +110^38 -1

Leave a Reply