Apache Derby 简明教程

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 服务器提供以下列出的类别的多种数据类型供您使用 −

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 TYPE

SIZE

FROM

TO

SMALLINT

2 bytes

-32768

32767

INTEGER

4 bytes

-2,147,483,648

2,147,483,647

BIGINT

8 bytes

-9223372036854775808

9223372036854775808

Approximate Numeric Data Types

以下是近似数值数据类型的列表 −

Following is the list of approximate numeric data types −

DATA TYPE

SIZE

FROM

TO

REAL

4 bytes

-3.40E + 38

3.40E + 38

DOUBLE PRECISION

8 bytes

-1.79E + 308

1.79E + 308

FLOAT

-1.79E + 308

1.79E + 308

Exact Numeric Data Types

以下是精确数值数据类型的列表 −

Following is the list of exact numeric data types −

DATA TYPE

FROM

TO

DECIMAL

-10^38 +1

10^38 -1

NUMERIC

-10^38 +1

10^38 -1