interbase:
Как получить полную информацию о полях таблицы:
SELECT
A.RDB$FIELD_NAME, /* field name */
A.RDB$FIELD_SOURCE, /* field internal name */
B.RDB$FIELD_TYPE, /* field type */
B.RDB$FIELD_SUB_TYPE, /* field sub_type */
B.RDB$FIELD_LENGTH, /* field physical length */
A.RDB$NULL_FLAG, /* field is nulled */
B.RDB$CHARACTER_LENGTH, /* field length for char type */
B.RDB$DIMENSIONS, /* field array size */
A.RDB$DEFAULT_SOURCE, /* field default source */
B.RDB$VALIDATION_SOURCE, /* field validation source */
B.RDB$FIELD_PRECISION, /* field precision */
-B.RDB$FIELD_SCALE AS SCALE /* field decimal */
FROM
RDB$RELATION_FIELDS A LEFT JOIN RDB$FIELDS B
ON A.RDB$FIELD_SOURCE = B.RDB$FIELD_NAME
WHERE
A.RDB$RELATION_NAME = 'TABLE_NAME'
ORDER BY
RDB$FIELD_POSITION;