主要介绍date、time、timestamp三个数据类型,文末有手册data type链接。
data type | Description | Example |
---|---|---|
DATA | yyyy-mm-dd,mm/dd/yyyy,dd.mm.yyyy | VALUES DATE(‘1994-02-23’) |
TIME | hh:mm[:ss],hh.mm[.ss],hh[:mm] {AM | PM} | VALUES TIME(‘15:09:02’) |
TIMESTAMP | yyyy-mm-dd hh:mm:ss[.nnnnnnnnn],yyyy-mm-dd-hh.mm.ss[.nnnnnnnnn] | VALUES TIMESTAMP(‘1962-09-23 03:23:34.234’) |
BIGINT | BIGINT provides 8 bytes of storage for integer values. | |
BLOB | A BLOB (binary large object) is a varying-length binary string that can be up to 2,147,483,647 characters long. Like other binary types, BLOB strings are not associated with a code page. In addition, BLOB strings do not hold character data. | |
BOOLEAN | BOOLEAN provides 1 byte of storage for logical values. | |
CHAR | CHAR provides for fixed-length storage of strings. | |
CHAR FOR BIT DATA | A CHAR FOR BIT DATA type allows you to store byte strings of a specified length. It is useful for unstructured data where character strings are not appropriate. | |
DECIMAL | DECIMAL provides an exact numeric in which the precision and scale can be arbitrarily sized. | |
DOUBLE | The DOUBLE data type is a synonym for the DOUBLE PRECISION data type. | |
… | … | … |
参考:
[1] derby10.15 手册 - data type