DB_NAME
Last updated
Last updated
This function returns the name of a specified database.().
Code:
Result:
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.
: CURRENT_DATABASE function has different behavior in certain cases.