DESCRIBE TABLE

statementsupportedTables, views, streams, sequences

docs.snowflake.com ↗

Object: TABLE

Describes either the columns in a table or the set of stage properties for the table (current values and default values). DESCRIBE can be abbreviated to DESC.

Syntax

supportedpartialnot supportednot scored

{ DESCRIBE | DESC } TABLE <name> [ TYPE =  { COLUMNS | STAGE } ]

Parameters

NameRequiredDescription
nameSpecifies the identifier for the table to describe. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.
TYPE = COLUMNS | STAGESpecifies whether to display the columns for the table or the set of stage properties for the table (current values and default values). Default: TYPE = COLUMNS

Usage notes

Output

When TYPE = COLUMNS, the command output provides the following properties and metadata: Column | Description name | Name of the column in the table. type | Data type of the column in the table. If collation has been specified for the column, the collation specification is included. kind | The kind of column: COLUMN for regular columns or VIRTUAL for virtual columns defined by an expression. null? | Whether the column accepts NULL values (Y or N). default | The default value for the column, if any (otherwise NULL). primary key | Whether the column is the primary key (or part of a multi-column primary key; Y or N). unique key | Whether the column has a UNIQUE constraint (Y or N). check | Reserved for future use. expression | The SQL expression that defines a virtual column. NULL for non-virtual columns. comment | The comment set for the column, if any (otherwise NULL). policy name | The masking policy set for the column, if any (otherwise NULL). privacy domain | The privacy domain set for the column, if any (otherwise NULL). schema_evolution_record | Records information about the latest triggered Schema Evolution for a given table column. This column contains the following subfields: EvolutionType: The type of the triggered schema evolution (ADD_COLUMN, ADD_FIELD, or DROP_NOT_NULL). EvolutionMode: The triggering ingestion mechanism (COPY, SNOWPIPE, or SNOWPIPE_STREAMING). FileName: The file name that triggered the evolution (NULL for SNOWPIPE_STREAMING). TriggeringTime: The approximate time when the column was evolved. QueryId or PipeId: A unique identifier of the triggering query or pipe (QUERY ID for COPY, PIPE ID for SNOWPIPE, or NULL for SNOWPIPE_STREAMING). Pipe name: Fully qualified pipe name that triggered schema evolution (SNOWPIPE_STREAMING only). Channel name: Channel that triggered schema evolution (SNOWPIPE_STREAMING only). offsetTokenUpperBound: An offset at or before which schema evolution was triggered (SNOWPIPE_STREAMING only). When TYPE = STAGE, the command output provides the current and default values for the table’s stage properties. See Example: Describe stage properties.

See also

Referenced by