Wednesday, March 28, 2012

Knowing current database

How can I identify the database which I execute an TSQL
statement.
The counterpart to @.@.ServerName...
Something like @.@.database?
thanks in advance.
/Tob
Tobbe,
select db_name() as DatabaseName
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Tobbe wrote:
> How can I identify the database which I execute an TSQL
> statement.
> The counterpart to @.@.ServerName...
> Something like @.@.database?
> thanks in advance.
> /Tob

No comments:

Post a Comment