Tab

Wednesday 8 June 2011

How to find the database ID

How to find the database ID in MS Sql Server.

SELECT * FROM sysdatabases

Name       dbid
----------------------------------
master 1
tempdb 2
model 3
msdb 4

These all are default database IDs in MS Sql Server which is assigned after installation.

No comments:

Post a Comment