Programming in MS SQL Server 2012

Metadata Functions



Function DB_NAME
Description Returns the database name.
Example USE master
SELECT DBID, DB_NAME(DBID) AS DBNAME
FROM sysdatabases
ORDER BY DBID
Result 1 master
2 tempdb
3 model
4 msdb
5 ReportServer
6 ReportServerTempDB
7 EBusiness

* * * * *


Email Your Comment To AUTHOR