You can use the information_schema.columns view to return information about all columns in a table in a database. The view is available in each database and contains one row for each column. You can use a SELECT query to return information about each column as shown in the example below.

To view column information, the user must have USAGE privileges on both the schema and the database, as well as any necessary table-level privileges or ownership of the table.

SELECT
  *
FROM
  information_schema.columns;

Columns in information_schema.columns

Each row has the following columns with information about each column.

Column NameData TypeDescription
table_catalogTEXTName of the catalog. Firebolt provides a single default catalog.
table_schemaTEXTName of the database containing the table.
table_nameTEXTName of the table containing the column.
column_nameTEXTName of the column.
ordinal_positionBIGINTThe ordinal position of the column.
column_defaultTEXTThe default expression for the column, if it exists.
is_nullableTEXTYES if the column may contain NULL, NO otherwise.
data_typeTEXTThe data type of the column.
is_in_partition_exprTEXTYES if the column is included in the table’s PARTITION BY clause, NO otherwise.
is_in_primary_indexTEXTYES if the column is included in the table’s PRIMARY INDEX clause, NO otherwise.
numeric_precisionBIGINTThe numeric precision. For numeric columns only.
character_maximum_lengthNULLNot applicable for Firebolt.
character_octet_lengthNULLNot applicable for Firebolt.
numeric_precision_radixNULLNot applicable for Firebolt.
interval_typeNULLNot applicable for Firebolt.
interval_precisionNULLNot applicable for Firebolt.
character_set_catalogNULLNot applicable for Firebolt.
character_set_schemaNULLNot applicable for Firebolt.
character_set_nameNULLNot applicable for Firebolt.
collation_catalogNULLNot applicable for Firebolt.
collation_schemaNULLNot applicable for Firebolt.
collation_nameNULLNot applicable for Firebolt.
domain_catalogNULLNot applicable for Firebolt.
domain_schemaNULLNot applicable for Firebolt.
domain_nameNULLNot applicable for Firebolt.
udt_catalogNULLNot applicable for Firebolt.
udt_schemaNULLNot applicable for Firebolt.
udt_nameNULLNot applicable for Firebolt.
scope_catalogNULLNot applicable for Firebolt.
scope_schemaNULLNot applicable for Firebolt.
scope_nameNULLNot applicable for Firebolt.
maximum_cardinalityNULLNot applicable for Firebolt.
dtd_identifierNULLNot applicable for Firebolt.
is_self_referencingNULLNot applicable for Firebolt.
is_identityNULLNot applicable for Firebolt.
identity_generationNULLNot applicable for Firebolt.
identity_startNULLNot applicable for Firebolt.
identity_incrementNULLNot applicable for Firebolt.
identity_maximumNULLNot applicable for Firebolt.
identity_minimumNULLNot applicable for Firebolt.
identity_cycleNULLNot applicable for Firebolt.
is_generatedNULLNot applicable for Firebolt.
generation_expressionNULLNot applicable for Firebolt.
is_updatableNULLNot applicable for Firebolt.