Returns the database name.
DB_NAME ( [ database-id ] )
database-id The ID of the database. The database-id must be a numeric expression.
The following statement returns the database name asiqdemo, when executed against the sample database.
SELECT DB_NAME( 0 ) FROM iq_dummy
If no database-id is supplied, the name of the current database is returned.