Note
Ang pag-access sa pahinang ito ay nangangailangan ng pahintulot. Maaari mong subukang mag-sign in o magpalit ng mga direktoryo.
Ang pag-access sa pahinang ito ay nangangailangan ng pahintulot. Maaari mong subukang baguhin ang mga direktoryo.
Applies to:
SQL Server
Azure SQL Managed Instance
Returns the database name specified by the user in the database connection string. This database is specified by using the sqlcmd-d option (USE database). It can also be specified with the Open Database Connectivity (ODBC) data source expression (initial catalog =databasename).
This database is different from the default user database.
Transact-SQL syntax conventions
Syntax
ORIGINAL_DB_NAME ()
Remarks
If the initial database isn't specified, the function returns an empty string.