In a Single SQL Server Instance ,it is possible to have multiple databases.
Each database has its own unique ID.
If you know the database ID then
refer the following syntax
Syntax:
DB_NAME('Database ID')
Example:
SELECT DB_NAME(5)
Output:
Sample
For the ID : 5 the Name of the database is Sample.
No comments:
Post a Comment