Supported Data Types
Go Up to Working with Data
To query or write to a table, it is necessary to know the structure of the table, what columns it contains, and what data types are defined for those columns. InterBase supports ten fundamental data types, described in the following table:
Name | Size | Range/Precision | Description |
---|---|---|---|
|
Variable |
|
|
|
16 bits |
|
|
|
<n> characters |
|
|
|
32 bits |
1 Jan 100 a.d. to 29 Feb 32768 a.d. |
|
|
Variable |
|
|
|
64 bits1 |
2.225 x 10–308 to 1.797 x 10308 |
IEEE double precision: 15 digits |
|
32 bits |
1.175 x 10–38 to 3.402 x 1038 |
IEEE single precision: 7 digits |
|
32 bits |
–2,147,483,648 to 2,147,483,647 |
Signed long (longword) |
|
Variable (16, 32, or |
|
|
|
16 bits |
–32,768 to 32,767 |
Signed short (word) |
|
32 bits |
00:00:00.0000 to 23:59:59.9999 |
|
|
64 bits |
1 Jan 100 a.d. to 29 Feb 32768 a.d. |
|
|
<n> characters |
|
|
- Actual size of DOUBLE is platform-dependent. Most platforms support the 64-bit size.
The BLOB
data type can store large data objects of indeterminate and variable size, such as bitmapped graphics images, vector drawings, sound files, chapter or book-length documents, or any other kind of multimedia information. Because a Blob can hold different kinds of information, it requires special processing for reading and writing. For more information about Blob handling, see Working with Blob Data.
The DATE
, TIME
, and TIMESTAMP
data types may require conversion to and from InterBase when entered or manipulated in a host-language program. For more information about retrieving and writing dates, see Working with Dates and Times.
InterBase also supports arrays of most data types. An array is a matrix of individual items, all of any single InterBase data type, except Blob, that can be handled either as a single entity, or manipulated item by item. To learn more about the flexible data access provided by arrays, see Using Arrays.
For a complete discussion of InterBase data types, see the Data Definition Guide.
InterBase looks for Booleans of the form “literal <relop> literal” that evaluate to FALSE and returns a false Boolean inversion node to short-circuit data retrieval.