DESCRIBE VARIABLE

statementsupportedUDFs, procedures, tasks, alerts, scripting

docs.snowflake.com ↗

Object: VARIABLE

Describes a schema variable, including its type, current value, default, and metadata. DESCRIBE can be abbreviated to DESC.

Syntax

DESC[RIBE] VARIABLE <name>

Parameters

NameRequiredDescription
nameSpecifies the identifier for the variable to describe. The identifier can be qualified with the schema name or with both the database and schema names.

Usage notes

Output

The command returns the following columns: Column | Data Type | Description name | VARCHAR | Name of the variable data_type | VARCHAR | Declared data type of the variable value | VARCHAR | Current value, or NULL if not set default_value | VARCHAR | Default value, or NULL if no default was declared version | NUMBER | Current version number; incremented on each SET owner | VARCHAR | Role that owns the variable comment | VARCHAR | Comment for the variable created_on | TIMESTAMP_LTZ | Date and time when the variable was created updated_on | TIMESTAMP_LTZ | Date and time when the variable was last modified

Access control requirements

A role used to execute this operation must have the following privileges at a minimum: Privilege | Object | Notes OWNERSHIP, READ, or WRITE | Variable | Any one of these privileges is sufficient. For instructions on creating a custom role with a specified set of privileges, see Creating custom roles. For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

See also

Referenced by