SQL Server/T-SQL/System/DB ID — различия между версиями

Материал из SQL эксперт
Перейти к: навигация, поиск
м (1 версия)
 
м (1 версия)
 
(нет различий)

Текущая версия на 13:20, 26 мая 2010

Returning the Current Database ID and Name

   <source lang="sql">

This DB_ID function returns the database integer ID and DB_NAME returns the database name for the current database. 5> 6> 7> SELECT DB_ID("master") DatabaseID, DB_NAME(1) DatabaseNM 8> GO DatabaseID DatabaseNM


-------------------------------------------------------------------------------------------------------------
        1 master

(1 rows affected)

</source>