DB_NAME function [System]

Function

Returns the database name.

Syntax

DB_NAME ( [ database-id ] )

NoteCIS functional compensation performance considerations apply. See “Conditions that cause processing by SQL Anywhere” in Chapter 3, “Optimizing Queries and Deletions,” in the Performance and Tuning Guide.

Parameters

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

Example

The following statement returns the database name iqdemo, 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]”