%DbName system variable

Description

%DbName returns the name of the current database as a string value.

Note:

On SQL Server, the value returned is the ODBC name for the database.