Returns the database name.
Syntax
DB_NAME ( [ database-id ] )
Note: CIS functional compensation performance considerations
apply.
Parameters
ParametersParameter
|
Description
|
database-id
|
The ID of the database. database-id must be
a numeric expression
|
Example
Returns the database name iqdemo,
when executed against the demo database:
SELECT DB_NAME( 0 ) FROM iq_dummy
Usage
If no database-id is supplied, the name
of the current database is returned.
Standards and Compatibility