Skip to main content
The SHOW DEFAULT SESSION VARIABLES FOR ROLE statement lists the values for updated session variables that are applied to a given user or role. The results returned only include the values of session variables that are changed from the defaults. When no session variables have been changed from the defaults for a given role, the statement returns no values.

Synopsis

show_default_session_variables_for_role syntax diagram

Parameters

Response

Required privileges

The user issuing this statement must have at least one of the following privileges:
  • CREATEROLE
  • MODIFYCLUSTERSETTING
  • MODIFYSQLCLUSTERSETTING

Examples

Output when no session variables have been changed

When no session variables have been changed from the defaults for a given role, the statement returns no values:
Another way of confirming zero rows of output:

Show changed session variables that apply to a user

Show changed session variables that apply to a user in different databases

Show updated default session variables that apply to all users

Get inline help in the SQL shell

See also