Categories:

Context functions (Session Object)

CURRENT_SCHEMASÂļ

Returns active search path schemas.

For more information about search path, see Object name resolution.

SyntaxÂļ

CURRENT_SCHEMAS()
Copy

ArgumentsÂļ

None.

Usage notesÂļ

Do not confuse this function with the similarly named function CURRENT_SCHEMA.

ExamplesÂļ

Show the schemas that will be searched if a table or other database object is referenced without a schema name:

SELECT CURRENT_SCHEMAS();
Copy

Output:

+-----------------------------------------+
| CURRENT_SCHEMAS()                       |
|-----------------------------------------|
| ["TEST_DB1.BILLING", "TEST_DB1.PUBLIC"] |
+-----------------------------------------+
Copy