# current_schema

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: current_schema
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: sql/sql-functions/other-functions/current-schema
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/sql-functions/other-functions/current-schema.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-functions/other-functions/current-schema.adoc
description: current_schema() is a session information function that returns the name of the current schema for the session.
page-topic-type: reference
page-git-created-date: "2026-05-26"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-functions/other-functions/current-schema.md -->

The [current\_schema()](https://www.postgresql.org/docs/current/functions-info.html#FUNCTIONS-INFO-SESSION) is a session information function that returns the name of the first existing schema.

## [](#syntax)Syntax

There are two available syntax versions of `current_schema()` function:

Version 1

```sql
SELECT current_schema();
```

Version 2

```sql
SELECT current_schema;
```

> 📝 **NOTE**
>
> Returns `NULL` if none of the schemas from `search_path` exist

## [](#examples)Examples

This example shows how to get the current schema name using this function:

```sql
SELECT current_schema();
```

Example output:

```sql
+------------------+
| current_schema   |
+------------------+
| public           |
+------------------+
```