SQL Reference
...
SQL Functions
Other Functions
CURRENT_SCHEMA
6min
The CURRENT_SCHEMA() function returns the name of the first existing schema.
It will return NULL if none of the schemas from search_path exist.
CURRENT_SCHEMA() function has the following syntax:
Syntax
|

Another method is to omit the parenthesis from the above syntax.
Another option
|

It does not require any argument to operate.
The following example shows how to get the current schema name using CURRENT_SCHEMA() function.
Current schema
|

The final result will display the schema that you currently use:
Output
|



Updated 31 Aug 2023
Did this page help you?