Thursday, December 15, 2011

How to List All the Databases from SQL Server


SELECT name FROM sys.databases

SELECT name FROM sys.sysdatabases

Or you can use the following system stored procedure

EXEC sp_databases
EXEC sp_helpdb

No comments:

Post a Comment