ASA SQL Reference
SQL Functions
Alphabetical list of functions
Returns the name of a database with a given ID number.
DB_NAME ( [ database-id ] )
database-id The ID of the database. The database-id must be a numeric expression.
If no database ID is supplied, the name of the current database is returned.
SQL/92 Vendor extension.
SQL/99 Vendor extension.
Sybase Compatible with Adaptive Server Enterprise.
The statement returns the database name asademo, when executed against the sample database as the sole database on the server.
SELECT DB_NAME( 0 )