USE SCHEMA | Snowflake Documentation (original) (raw)

Specifies the active/current schema for the session:

See also:

CREATE SCHEMA , ALTER SCHEMA , DROP SCHEMA , SHOW SCHEMAS

Syntax

USE [ SCHEMA ] [.]

Parameters

[_dbname_.]_name_

Specifies the identifier for the schema to use for the session. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

The SCHEMA keyword is optional if the schema name is fully qualified (in the form of _dbname_._schemaname_).

The database name (_dbname_) is optional if the database is specified in the user session and the SCHEMA keyword is included.

Examples

Use the myschema schema with the database specified in the user session:

Use the myschema schema in the mydb database: