Skip to main content

UNSET VARIABLE

Introduced or updated: v1.2.609

Removes one or more variables from the current session.

Syntax

-- Remove one variable
UNSET VARIABLE <variable_name>

-- Remove more than one variable
UNSET VARIABLE (<variable1>, <variable2>, ...)

Examples

The following example unsets a single variable:

-- Remove the variable a from the session
UNSET VARIABLE a;

The following example unsets multiple variables:

-- Remove variables x and y from the session
UNSET VARIABLE (x, y);
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today