EXEC sp_databases
EXEC sp_helpdb
—-SQL 2000 Method still works in SQL Server 2005
SELECT name
FROM sys.databases
SELECT name
FROM sys.sysdatabases
—-SQL SERVER Un-Documented Procedure
EXEC sp_msForEachDB ‘PRINT ”?”’
EXEC sp_databases
EXEC sp_helpdb
—-SQL 2000 Method still works in SQL Server 2005
SELECT name
FROM sys.databases
SELECT name
FROM sys.sysdatabases
—-SQL SERVER Un-Documented Procedure
EXEC sp_msForEachDB ‘PRINT ”?”’