Skip to content
Developer Edition runs on one host and does not require a product license file. Need multi-host deployment or performance testing at scale? Explore Enterprise Edition

Deprecated

This command has been deprecated. Please use ALTER USER SET HOME_SCHEMA to set the home schema for the current user in the catalog.

SET USER SCHEMA command

The SET USER SCHEMA command sets the home schema for the current user in the catalog.

To set the schema for the current session, use SESSION SET.

Syntax

set_user_schema_command
SET USER SCHEMA schema_reference

set_user_schema_command ::=
    'SET' 'USER' 'SCHEMA' schema_reference

Parameters

schema_reference

The reference to the path of the schema. It specifies the path of the schema to be set as the home schema for the current user.

The path is case-sensitive and must match the path of an existing schema. Both absolute and relative schema paths can be used in the command. You can use CREATE SCHEMA to create a schema.

Examples

'''
// Create a schema
CREATE SCHEMA IF NOT EXISTS /my_schema
'''

'''
// Set the home schema for the current user
SET USER SCHEMA /my_schema
'''

More information