Skip to content
 

List All Databases

To list all databases in a SQL Server instance, run the following:

SELECT *
FROM sys.sysdatabases

This also outputs metadata about each database including createdate, compatibility level, and the MDF filename.



Popular search terms:

post a comment OR Post Your Question on our ASK! Community!