Count the total number of databases

sql-server

Solution

SELECT * FROM sys.databases 

OR

SELECT COUNT(*) FROM sys.databases

Problem

I am working in SQL server having a large number of databases. I want to count the number of databases. Is there any query to count?

Original source

Related problems