SQL Server query to find all current database names

前端 未结 8 578
傲寒
傲寒 2020-12-03 09:34

I need a SQL query to find the names of existing databases.

8条回答
  •  抹茶落季
    2020-12-03 09:56

    For people where "sys.databases" does not work, You can use this aswell;

    SELECT DISTINCT TABLE_SCHEMA from INFORMATION_SCHEMA.COLUMNS
    

提交回复
热议问题