Icon CURRENT_DATABASE

Returns the current database's name as a string.

Syntax
CURRENT_DATABASE()

Returns
VARCHAR

Usage
The CURRENT_DATABASE function returns the current database's name as a string.

Examples
-- This script backs up the current database

SCRIPT
BEGIN
   EXECUTE IMMEDIATE 'BACKUP DATABASE "' + CURRENT_DATABASE() + '" AS "' +
                     CAST(CURRENT_DATE AS VARCHAR(10)) +
                     '-' + CURRENT_DATABASE() +
                     '" TO STORE "Backups" INCLUDE CATALOG';
END

SQL 2003 Standard Deviations
This function deviates from the SQL 2003 standard in the following ways:

DeviationDetails
ExtensionThis function is an ElevateDB extension.
Image