SET

statementsupportedAccounts, users, sessions, warehouses

docs.snowflake.com ↗

Initializes the value of a session variable to the result of a SQL expression. To write to a schema variable, use a qualified name (SET schema.name = value or SET database.schema.name = value). An unqualified SET name = value always targets a session variable, even if a schema variable of the same name exists.

Syntax

SET <var> = <expr>

SET ( <var> [ , <var> ... ] )  = ( <expr> [ , <expr> ... ] )

Parameters

NameRequiredDescription
varSpecifies the identifier for the variable to initialize.
exprSpecifies the SQL expression for the variable.

Usage notes

See also

Referenced by