Other Functions
CURRENT_SCHEMA
Overview
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. Syntax
CURRENT_SCHEMA()
function has the following syntax:
Another method is to omit the parenthesis from the above syntax.
It does not require any argument to operate.
Example
The following example shows how to get the current schema name using CURRENT_SCHEMA()
function.
The final result will display the schema that you currently use: