Firebird 2.5 Language Reference → Firebird 2.5 Language Reference → System Tables → RDB$FIELDS |
RDB$FIELDS stores definitions of columns and domains, both system and custom. This is where the detailed data attributes are stored for all columns.
Note | |
---|---|
The column RDB$FIELDS.RDB$FIELD_NAME links to RDB$RELATION_FIELDS.RDB$FIELD_SOURCE, not to RDB$RELATION_FIELDS.RDB$FIELD_NAME. |
Column Name | Data Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RDB$FIELD_NAME | CHAR(31) | The unique name of the domain created by the user or of the domain automatically built for the table column by the system. System-created domain names start with the 'RDB$' prefix | ||||||||||||
RDB$QUERY_NAME | CHAR(31) | Not used | ||||||||||||
RDB$VALIDATION_BLR | BLOB BLR | The binary language representation (BLR) of the SQL expression specifying the check of the CHECK value in the domain | ||||||||||||
RDB$VALIDATION_SOURCE | BLOB TEXT | The original source text in the SQL language specifying the check of the CHECK value | ||||||||||||
RDB$COMPUTED_BLR | BLOB BLR | The binary language representation (BLR) of the SQL expression the database server uses for evaluation when accessing a COMPUTED BY column | ||||||||||||
RDB$COMPUTED_SOURCE | BLOB TEXT | The original source text of the expression that defines a COMPUTED BY column | ||||||||||||
RDB$DEFAULT_VALUE | BLOB BLR | The default value, if any, for the field or domain, in binary language representation (BLR) | ||||||||||||
RDB$DEFAULT_SOURCE | BLOB TEXT | The default value in the source code, as an SQL constant or expression | ||||||||||||
RDB$FIELD_LENGTH | SMALLINT | Column size in bytes. FLOAT, DATE, TIME, INTEGER occupy 4 bytes. DOUBLE PRECISION, BIGINT, TIMESTAMP and BLOB identifier occupy 8 bytes. For the CHAR and VARCHAR data types, the column stores the maximum number of bytes specified when a string domain (column) is defined | ||||||||||||
RDB$FIELD_SCALE | SMALLINT | The negative number that specifies the scale for DECIMAL and NUMERIC columns—the number of digits after the decimal point | ||||||||||||
RDB$FIELD_TYPE | SMALLINT | Data type code for the column:
|
||||||||||||
RDB$FIELD_SUB_TYPE | SMALLINT |
Specifies the subtype for the BLOB data type:
Specifies for the CHAR data type:
Specifies the particular data type for the integer data types (SMALLINT, INTEGER, BIGINT) and for fixed-point numbers (NUMERIC, DECIMAL):
|
||||||||||||
RDB$MISSING_VALUE | BLOB BLR | Not used | ||||||||||||
RDB$MISSING_SOURCE | BLOB TEXT | Not used | ||||||||||||
RDB$DESCRIPTION | BLOB TEXT | Any domain (table column) comment text | ||||||||||||
RDB$SYSTEM_FLAG | SMALLINT | Flag: the value of 1 means the domain is automatically created by the system, the value of 0 means that the domain is defined by the user | ||||||||||||
RDB$QUERY_HEADER | BLOB TEXT | Not used | ||||||||||||
RDB$SEGMENT_LENGTH | SMALLINT | Specifies the length of the BLOB buffer in bytes for BLOB columns. Stores NULL for all other data types | ||||||||||||
RDB$EDIT_STRING | VARCHAR(127) | Not used | ||||||||||||
RDB$EXTERNAL_LENGTH | SMALLINT | The length of the column in bytes if it belongs to an external table. Always NULL for regular tables | ||||||||||||
RDB$EXTERNAL_SCALE | SMALLINT | The scale factor of an integer-type field in an external table; represents the power of 10 by which the integer is multiplied | ||||||||||||
RDB$EXTERNAL_TYPE | SMALLINT | The data type of the field as it is represented in
an external table:
|
||||||||||||
RDB$DIMENSIONS | SMALLINT | Defines the number of dimensions in an array if the column is defined as an array. Always NULL for columns that are not arrays | ||||||||||||
RDB$NULL_FLAG | SMALLINT | Specifies whether the column can take an empty value (the field will contain NULL) or not (the field will contain the value of 1) | ||||||||||||
RDB$CHARACTER_LENGTH | SMALLINT | The length of CHAR or VARCHAR columns in characters (not in bytes) | ||||||||||||
RDB$COLLATION_ID | SMALLINT | The identifier of the collation sequence for a character column or domain. If it is not defined, the value of the field will be 0 | ||||||||||||
RDB$CHARACTER_SET_ID | SMALLINT | The identifier of the character set for a character column, BLOB TEXT column or domain | ||||||||||||
RDB$FIELD_PRECISION | SMALLINT | Specifies the total number of digits for the fixed-point numeric data type (DECIMAL and NUMERIC). The value is 0 for the integer data types, NULL is for other data types |
Firebird 2.5 Language Reference → Firebird 2.5 Language Reference → System Tables → RDB$FIELDS |