Monday, 20 June 2011

Find all Database ID's on an instance using TSQL - SSMS (SELECT * FROM sysdatabases)

To return a list of all databases and their Database ID numbers use the following SQL against a specific instance.

USE
GO
SELECT master * FROM sysdatabases

Useful Links: http://msdn.microsoft.com/en-us/library/ms186274.aspx

No comments:

Post a Comment