Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Returns the name of a database with a given ID number.
DB_NAME( [ 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.
Cloud note: Because of tenant database isolation rules, when this function is called in the cloud it returns only information about the
current tenant database.
The statement returns the database name demo when executed against the SQL Anywhere sample database as the sole database on
SELECT DB_NAME( 0 );