Wednesday, March 21, 2012

Name of current db in proc

Hi,
What's the best way to get the name of the current db (not filename, but db
name) from inside a sp '
I'm writing a general sp that has to be put into numerous db's, except one
Kr.
SorenHi,
DB_NAME() must be the way to go :)
Soren
"Soeren S. Joergensen" <nospam@.nodomain.com> skrev i en meddelelse
news:eska3MgtFHA.2328@.TK2MSFTNGP10.phx.gbl...
> Hi,
> What's the best way to get the name of the current db (not filename, but
> db name) from inside a sp '
> I'm writing a general sp that has to be put into numerous db's, except one
>
> Kr.
> Soren
>sql

No comments:

Post a Comment