Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » SQL Functions » Alphabetical list of functions

DB_ID function [System] Next Page

DB_NAME function [System]


Returns the name of a database with a given ID number.

Syntax

DB_NAME( [ database-id ] )

Parameters

database-id    The ID of the database. The database-id must be a numeric expression.

Remarks

If no database ID is supplied, the name of the current database is returned.

Standards and compatibility
Example

The statement returns the database name demo, when executed against the SQL Anywhere sample database as the sole database on the server.

SELECT DB_NAME( 0 );