Thursday, August 16, 2012

Script to find DB_ID in SQL Server 2000

USE master

SELECT NAME
 ,DB_ID(NAME) AS DB_ID
FROM sysdatabases
ORDER BY dbid

No comments:

Post a Comment