How can I list all databases on an SQL Server?

Neil Pike

December 23, 1999

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. The SQL Server specific way (all versions) is :-

select name from master..sysdatabases

The ANSI standard way (SQL 7 only) is :-

select CATALOG_NAME from INFORMATION_SCHEMA.SCHEMATA

Read more FAQs and learn more about "Creating SQL Server Databases."

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like