> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

> Use this reference to learn about the metadata available for Firebolt columns using the information schema.

# Columns

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](/security/rbac/database-permissions/schema-permissions#schema-level-privileges) and the [database](/security/rbac/database-permissions#database-level-privileges), as well as any necessary [table-level privileges](/security/rbac/database-permissions/table-permissions#table-level-privileges) or ownership of the table.

<Note>
  When [column-level security](/security/guides/column-level-security) is in effect, `information_schema.columns` shows only the columns the current user is permitted to read. Columns that the user has not been granted access to are not visible in this view.
</Note>

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
SELECT
  *
FROM
  information_schema.columns;
```

## Columns in information\_schema.columns

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

| Column Name                | Data Type | Description                                                                            |
| :------------------------- | :-------- | :------------------------------------------------------------------------------------- |
| table\_catalog             | TEXT      | Name of the catalog. Firebolt provides a single `default` catalog.                     |
| table\_schema              | TEXT      | Name of the database containing the table.                                             |
| table\_name                | TEXT      | Name of the table containing the column.                                               |
| column\_name               | TEXT      | Name of the column.                                                                    |
| ordinal\_position          | BIGINT    | The ordinal position of the column.                                                    |
| column\_default            | TEXT      | The default expression for the column, if it exists.                                   |
| is\_nullable               | TEXT      | `YES` if the column may contain NULL, `NO` otherwise.                                  |
| data\_type                 | TEXT      | The data type of the column.                                                           |
| is\_in\_partition\_expr    | TEXT      | `YES` if the column is included in the table's `PARTITION BY` clause, `NO` otherwise.  |
| is\_in\_primary\_index     | TEXT      | `YES` if the column is included in the table's `PRIMARY INDEX` clause, `NO` otherwise. |
| numeric\_precision         | BIGINT    | The numeric precision. For numeric columns only.                                       |
| description                | TEXT      | The description of the column.                                                         |
| character\_maximum\_length | NULL      | Not applicable for Firebolt.                                                           |
| character\_octet\_length   | NULL      | Not applicable for Firebolt.                                                           |
| numeric\_precision\_radix  | NULL      | Not applicable for Firebolt.                                                           |
| interval\_type             | NULL      | Not applicable for Firebolt.                                                           |
| interval\_precision        | NULL      | Not applicable for Firebolt.                                                           |
| character\_set\_catalog    | NULL      | Not applicable for Firebolt.                                                           |
| character\_set\_schema     | NULL      | Not applicable for Firebolt.                                                           |
| character\_set\_name       | NULL      | Not applicable for Firebolt.                                                           |
| collation\_catalog         | NULL      | Not applicable for Firebolt.                                                           |
| collation\_schema          | NULL      | Not applicable for Firebolt.                                                           |
| collation\_name            | NULL      | Not applicable for Firebolt.                                                           |
| domain\_catalog            | NULL      | Not applicable for Firebolt.                                                           |
| domain\_schema             | NULL      | Not applicable for Firebolt.                                                           |
| domain\_name               | NULL      | Not applicable for Firebolt.                                                           |
| udt\_catalog               | NULL      | Not applicable for Firebolt.                                                           |
| udt\_schema                | NULL      | Not applicable for Firebolt.                                                           |
| udt\_name                  | NULL      | Not applicable for Firebolt.                                                           |
| scope\_catalog             | NULL      | Not applicable for Firebolt.                                                           |
| scope\_schema              | NULL      | Not applicable for Firebolt.                                                           |
| scope\_name                | NULL      | Not applicable for Firebolt.                                                           |
| maximum\_cardinality       | NULL      | Not applicable for Firebolt.                                                           |
| dtd\_identifier            | NULL      | Not applicable for Firebolt.                                                           |
| is\_self\_referencing      | NULL      | Not applicable for Firebolt.                                                           |
| is\_identity               | NULL      | Not applicable for Firebolt.                                                           |
| identity\_generation       | NULL      | Not applicable for Firebolt.                                                           |
| identity\_start            | NULL      | Not applicable for Firebolt.                                                           |
| identity\_increment        | NULL      | Not applicable for Firebolt.                                                           |
| identity\_maximum          | NULL      | Not applicable for Firebolt.                                                           |
| identity\_minimum          | NULL      | Not applicable for Firebolt.                                                           |
| identity\_cycle            | NULL      | Not applicable for Firebolt.                                                           |
| is\_generated              | NULL      | Not applicable for Firebolt.                                                           |
| generation\_expression     | NULL      | Not applicable for Firebolt.                                                           |
| is\_updatable              | NULL      | Not applicable for Firebolt.                                                           |

The following example retrieves the column names, data types, and nullability for all columns in the `tournaments` table:

<div className="query-window">
  ```
  SELECT column_name, data_type, is_nullable
  FROM information_schema.columns
  WHERE table_name = 'tournaments'
  ORDER BY ordinal_position;
  ```

  | column\_name <span>text null</span> | data\_type <span>text null</span> | is\_nullable <span>text null</span> |
  | :---------------------------------- | :-------------------------------- | :---------------------------------- |
  | tournamentid                        | INTEGER                           | YES                                 |
  | name                                | TEXT                              | YES                                 |
  | gameid                              | INTEGER                           | YES                                 |
  | totalprizedollars                   | INTEGER                           | YES                                 |
  | startdatetime                       | TIMESTAMP                         | YES                                 |
  | enddatetime                         | TIMESTAMP                         | YES                                 |
  | rulesdefinition                     | TEXT                              | YES                                 |

  <p><span>Rows: 7</span><span>Execution time: 2.79ms</span></p>
</div>
