DB_NAME function [System]

Function

Returns the database name.

Syntax

DB_NAME ( [ database-id ] )

Parameters

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

Example

The following statement returns the database name asiqdemo, when executed against the sample 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

See also

“COL_NAME function [System]”

“DB_ID function [System]”

“OBJECT_NAME function [System]”