SET DEFAULT
Syntax
Description
This sets the Database, Organization, Role, Schema, or Store as the user’s default. Changing defaults does not affect the current session’s context, and it must additionally call USE to change the context. Entering a new user session has the same outcome as changing it with USE.
Any entity used to set as default must already exist and be accessible by the user.
Arguments
entity_name
Name of the entity to set as a default. For case-sensitive names, the name must be wrapped in double quotes; otherwise, the lowercase name will be used.
Examples
Set a new default Database
The following changes the user’s current Database to otherdb
:
Set a new default Schema
The following changes the user’s current Schema to the demodb.Analytics
Schema within the current Database, demodb
:
Last updated