VeloDB Cloud
SQL Manual
SQL Statements
Database Administration
UNSET-VARIABLE

UNSET-VARIABLE

Name

UNSET VARIABLE

Description

This statement is used to restore Doris system variables. These system variables can be modified at global or session level.

grammar:

UNSET [SESSION|GLOBAL] VARIABLE (variable_name | ALL)

illustrate:

  1. (variable_name | ALL): statement must be ended with a variable name or keyword ALL.

Note:

  1. Only ADMIN users can unset variables to take effect globally
  2. When restore a variable with GLOBAL, it only affect your current using session and new open sessions. It does not affect other current open sessions.

Example

  1. Restore value of the time zone

    UNSET VARIABLE time_zone;
  2. Restore the global execution memory size

    UNSET GLOBAL VARIABLE exec_mem_limit;
  3. Restore all variables globally

    UNSET GLOBAL VARIABLE ALL;

Keywords

UNSET, VARIABLE

Best Practice