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