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

SHOW CURRENT_SCHEMA command

The SHOW CURRENT_SCHEMA command returns information about the schema in the current session.

By default, /default_schema is set as the schema in the current session. To change it, use SESSION SET.

If the current user no longer has USAGE on the schema in the current session, this command returns an empty result instead of exposing the schema path. For more information, see Schema access control.

The following table describes the returned information:

Column Description
path The path of the schema. The path is a logical path used to organize schemas.
owner The owner of the schema.

Syntax

show_current_schema_command
SHOW CURRENT_SCHEMA

show_current_schema_command ::=
    'SHOW' 'CURRENT_SCHEMA'

Examples

Show the schema in the current session

SHOW CURRENT_SCHEMA

Return:

+-----------------+-------+
| path            | owner |
+-----------------+-------+
| /default_schema | root  |
+-----------------+-------+