Data type

<< Data set | IBExpert Glossary | Database >>

Firebird/InterBase® tables are defined by the specification of columns, which accommodate appropriate information in each column using data types, for example, numerical (NUMERIC, DECIMAL, INTEGER), textual (CHAR, VARCHAR, NCHAR, NVARCHAR), date (DATE, TIME, TIMESTAMP) or blobs.

The data type is an elemental unit when defining data, which specifies the type of data which may be stored in tables, and which operations may be performed on this data. It can also include permissible calculative operations and maximum data size.

The data type can be defined in IBExpert using the DB Explorer, by creating a domain or creating a new field in the Create Table or Table Editor.

It can of course, also be defined using SQL directly in the IBExpert SQL Editor. The syntax for the data type definition is as follows:

 <data_type> = {
 {SMALLINT | INTEGER | BIGINT | FLOAT | DOUBLE PRECISION}
 [<array_dim>]
 | {DECIMAL | NUMERIC} [(precision [, scale])]
 [<array_dim]
 | DATE [<array_dim>]
 | {CHAR | CHARACTER | CHARACTER VARYING | VARCHAR}
  [(int)] [<array_dim>] CHARACTER SET charname]
 | {NCHAR | NATIONAL CHARACTER | NATIONAL CHAR}
  VARYING] [(int)] [<array_dim>]
 | BLOB SUB_TYPE {int | subtype_name}) (SEGMENT SIZE int]
  CHARACTER SET charname]
 | BLOB [(seglen [, subtype])]
 }

The Firebird/InterBase® data type definitions included in this section have been kept as close as possible to original InterBase® definitions to avoid any potential misunderstanding or conflict with the data types of other database programs.

back to top of page

Firebird 4.0 data types

TIME ZONE

Time zone support consists of TIME WITH TIME ZONE and TIMESTAMP WITH TIME ZONE data types, expressions and statements to work with time zones and conversion between data types without/with time zones. Please refer to TIME ZONE for details.

Initial support in IBExpert from version 2018.12.15.

BINARY, VARBINARY, BINARY VARYING

IBExpert support since version 2018.12.15. Please refer to: BINARY, VARBINARY, BINARY VARYING (Firebird 4.0)

DECFLOAT

Please refer to: DECFLOAT (Firebird 4.0)

Enhancement in precision of calculations with NUMERIC/DECIMAL (Firebird 4.0)

Since version 2017.12.03 IBExpert supports Firebird 4 NUMERIC/DECIMAL datatpes with a maximum precision fo 34 digits.

back to top of page

Firebird 3.0 data types

BOOLEAN

The BOOLEAN data type was introduced in Firebird 3.0. Syntax and examples can be referred to in the The Firebird 3.0 Release Notes (27 January 2014 - Document v.0300-08 - for Firebird 3.0 Alpha 2).

IDENTITY

The IDENTITY data type was introduced in Firebird 3.0.

Syntax and examples can be referred to in the The Firebird 3.0 Release Notes (27 January 2014 - Document v.0300-08 - for Firebird 3.0 Alpha 2).

See also:
Selecting the right data type to improve database performance
Migration from MS-SSQL to Firebird: Data types
Firebird 2.5 Language Reference: Data types and subtypes
Firebird 2.1 Language Reference: Data types and subtypes
Firebird 2.0 Language Reference: Data types and subtypes

back to top of page
<< Data set | IBExpert Glossary | Database >>