Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的问题在 mysql 中很简单我使用database()函数来获取数据库名称
database()
SQL Server 中有没有做同样事情的函数?
有一个函数叫做DB_NAME()like
DB_NAME()
SELECT DB_NAME() AS DataBaseName
看这里
有DB_NAME()返回当前数据库的名称。
SELECT DB_NAME()