Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

CURRENT_DATABASE

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

Syntax

Copy
current_database()

Return Type

Returns a CHAR or VARCHAR string.

Example

The following query returns the name of the current database:

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