Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

currentDb function

0 views
Skip to first unread message

Roy Goldhammer

unread,
Jun 18, 2007, 10:58:22 AM6/18/07
to
Hello there

IS there a way when i run procedure to know from which database i run it?

on server there is @@servername and for users there is SUSER_SNAME()

is there is something like this for the current database?


Aaron Bertrand [SQL Server MVP]

unread,
Jun 18, 2007, 11:04:18 AM6/18/07
to
SELECT DB_NAME()

See the topics in Books Online:

Meta Data Functions
Configuration Functions
System Functions
System Statistical Functions

--
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006


"Roy Goldhammer" <r...@hotmail.com> wrote in message
news:uYBWkkbs...@TK2MSFTNGP06.phx.gbl...

0 new messages