DB_NAME
Description
This function returns the name of a specified database.(DB_NAME in Transact-SQL).
Sample Source Pattern
Syntax
IN -> SqlServer_01.sql
Examples
Code:
IN -> SqlServer_02.sql
Result:
Known issues
1. CURRENT_DATABASE function has different behavior in certain cases
DB_NAME function can be invoked with the database_id parameter, which returns the name of the specified database. Without parameters, the function returns the current database name. However, SnowFlake does not support this parameter and the CURRENT_DATABASE function will always return the current database name.
Related EWIs
SSC-FDM-TS0010: CURRENT_DATABASE function has different behavior in certain cases.
Last updated