CURRENT_DATABASE - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198. Existing Python UDFs will continue to function until June 30, 2026. For more information, see the blog post .

CURRENT_DATABASE

Returns the name of the database where you are currently connected.

Syntax

current_database()

Return type

Returns a CHAR or VARCHAR string.

Example

The following query returns the name of the current database.

select current_database(); current_database ------------------ tickit (1 row)