Returns the database name.
DB_NAME ( [ database-id ] )
CIS 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.
database-id The ID of the database. database-id must be a numeric expression.
The following statement returns the database name iqdemo, when executed against the sample database:
SELECT DB_NAME( 0 ) FROM iq_dummy
If no database-id is supplied, the name of the current database is returned.