Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.oxla.com/llms.txt

Use this file to discover all available pages before exploring further.

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:
SELECT current_schema();
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
SELECT current_schema();
The output from the above query can be as follows:
+------------+
| f          |
+------------+
| public     |
+------------+