Skip to main content
The SHOW COLUMNS shows details about columns in a table, including each column’s name, type, default value, and whether or not it’s nullable.

Required privileges

The user must have any on the target table.

Synopsis

show_columns syntax diagram

Parameters

ParameterDescription
table_nameThe name of the table for which to show columns.

Response

The following fields are returned for each column.
FieldDescription
column_nameThe name of the column.
data_typeThe of the column.
is_nullableWhether or not the column accepts NULL. Possible values: true or false.
column_defaultThe default value for the column, or an expression that evaluates to a default value.
generation_expressionThe expression used for a .
indicesThe list of that the column is involved in, as an array.
is_hiddenWhether or not the column is hidden. Possible values: true or false.

Examples

Setup

To follow along, run to start a temporary, in-memory cluster with the sample dataset preloaded:

Show columns in a table

Alternatively, within the built-in SQL shell, you can use the \d :

Show columns with comments

You can use to add comments on a column.

See also