Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
返回具有给定 ID 号的数据库的名称。
DB_NAME( [ database-id ] )
database-id 数据库的 ID。database-id 必须是数字表达式。
VARCHAR
如果未提供数据库 ID,则返回当前数据库的名称。
SQL/2008 服务商扩充。
执行对象是作为服务器上唯一数据库的 SQL Anywhere 示例数据库时,该语句返回数据库名 demo。
SELECT DB_NAME( 0 );