How can I get the name of the current database within a TSQL query (SQL
2000)? There doesn't seem to be an @.@.variable for it.Use the DB_NAME() function.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Laurence Neville" <laurenceneville@.hotmail.com> wrote in message
news:uDJEBSofGHA.2188@.TK2MSFTNGP04.phx.gbl...
> How can I get the name of the current database within a TSQL query (SQL
> 2000)? There doesn't seem to be an @.@.variable for it.
>|||SELECT DB_NAME()
Denis the SQL Menace
http://sqlservercode.blogspot.com/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment