Cloud
current_schema
The current_schema() is a session information function that returns the name of the first existing schema.
Syntax
There are two available syntax versions of current_schema() function:
Version 1
SELECT current_schema();
Version 2
SELECT current_schema;
|
Returns |
Examples
This example shows how to get the current schema name using this function:
SELECT current_schema();
Example output:
+------------------+
| current_schema |
+------------------+
| public |
+------------------+
Was this helpful?