Search This Blog

Wednesday, September 19, 2007

T-SQL Determine Database ID

SELECT name, DB_ID(name) AS DB_ID
FROM master.dbo.sysdatabases
ORDER BY dbid

1 comment:

Gary Kindel said...

SQL 2005 using sp_HelpDB