I personally recommend using EXEC sp_databases because it gives the same results as other but it is self explaining.
----SQL-SERVER
2005 Store Procedure
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
''?''';
No comments:
Post a Comment