Cloud

current_database

The current_database() is a session information function that returns the current database’s name.

Syntax

The syntax for this function is:

SELECT current_database();

Examples

This example shows how to obtain the name of the currently connected database:

SELECT current_database();

The query returns the output:

+------------+
| f          |
+------------+
| redpanda   |
+------------+