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

# columns

> columns contains information about all table columns (or view columns).

`columns` contains information about all table columns (or view columns).

**Note**

The metadata of [synchronous materialized views](/documents/4.2/using_starrocks/Materialized_view-single_table.md) is not recorded in `columns`. You can access it by executing `SHOW PROC '/dbs/db/table/index_schema'`.

The following fields are provided in `columns`:

| **Field** | **Description** |
| - | - |
| TABLE\_CATALOG | The name of the catalog to which the table containing the column belongs. This value is always `NULL`. |
| TABLE\_SCHEMA | The name of the database to which the table containing the column belongs. |
| TABLE\_NAME | The name of the table containing the column. |
| COLUMN\_NAME | The name of the column. |
| ORDINAL\_POSITION | The ordinal position of the column within the table. |
| COLUMN\_DEFAULT | The default value for the column. This is `NULL` if the column has an explicit default of `NULL`, or if the column definition includes no `DEFAULT` clause. |
| IS\_NULLABLE | The column nullability. The value is `YES` if `NULL` values can be stored in the column, `NO` if not. |
| DATA\_TYPE | The column data type. The `DATA_TYPE` value is the type name only with no other information. The `COLUMN_TYPE` value contains the type name and possibly other information such as the precision or length. |
| CHARACTER\_MAXIMUM\_LENGTH | For string columns, the maximum length in characters. |
| CHARACTER\_OCTET\_LENGTH | For string columns, the maximum length in bytes. |
| NUMERIC\_PRECISION | For numeric columns, the numeric precision. |
| NUMERIC\_SCALE | For numeric columns, the numeric scale. |
| DATETIME\_PRECISION | For temporal columns, the fractional seconds precision. |
| CHARACTER\_SET\_NAME | For character string columns, the character set name. |
| COLLATION\_NAME | For character string columns, the collation name. |
| COLUMN\_TYPE | The column data type. The `DATA_TYPE` value is the type name only with no other information. The `COLUMN_TYPE` value contains the type name and possibly other information such as the precision or length. |
| COLUMN\_KEY | Whether the column is indexed:<ul><li>If `COLUMN_KEY` is empty, the column either is not indexed or is indexed only as a secondary column in a multiple-column, nonunique index.</li><li>If `COLUMN_KEY` is `PRI`, the column is a `PRIMARY KEY` or is one of the columns in a multiple-column `PRIMARY KEY`.</li><li>If `COLUMN_KEY` is `UNI`, the column is the first column of a `UNIQUE` index. (A `UNIQUE` index permits multiple `NULL` values, but you can tell whether the column permits `NULL` by checking the `Null` column.)</li><li>If `COLUMN_KEY` is `DUP`, the column is the first column of a nonunique index in which multiple occurrences of a given value are permitted within the column.</li></ul>If more than one of the `COLUMN_KEY` values applies to a given column of a table, `COLUMN_KEY` displays the one with the highest priority, in the order `PRI`, `UNI`, `DUP`. A `UNIQUE` index may be displayed as `PRI` if it cannot contain `NULL` values and there is no `PRIMARY KEY` in the table. A `UNIQUE` index may display as `MUL` if several columns form a composite `UNIQUE` index; although the combination of the columns is unique, each column can still hold multiple occurrences of a given value. |
| EXTRA | Any additional information that is available about a given column. |
| PRIVILEGES | The privileges you have for the column. |
| COLUMN\_COMMENT | The comments of the column. |
| COLUMN\_SIZE | The maximum length of the column in bytes. |
| DECIMAL\_DIGITS | The number of fractional digits for numeric types. |
| GENERATION\_EXPRESSION | The expression used to generate the column's value. |
| SRS\_ID | The spatial reference system identifier for spatial columns. |
| COLUMN\_SIZE | |
| DECIMAL\_DIGITS | |
| GENERATION\_EXPRESSION | For generated columns, displays the expression used to compute column values. Empty for nongenerated columns. |
| SRS\_ID | This value applies to spatial columns. It contains the column `SRID` value that indicates the spatial reference system for values stored in the column. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.