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
Wednesday, March 28, 2012
Knowing current database
Labels:
counterpart,
current,
database,
databasethanks,
execute,
identify,
knowing,
microsoft,
mysql,
oracle,
server,
servername,
sql,
tsqlstatement
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment