Skip to main content

Overview

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:
It will return NULL if none of the schemas from search_path exist

Example

The following example shows how to get the current schema name using this function
The output from the above query can be as follows: