Which function is used to know the database name by giving the database ID?

 Posted by Abhisek on 2/25/2010 | Category: Sql Server Interview questions | Views: 1971
Answer:

The DB_NAME function is used to know the database name. It takes the database id as the argument.
DB_NAME(dbID)


Example:- SELECT DB_NAME(5) -->Student


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response