Friday, February 24, 2012

How to know the DB name?

I'm working on SQL Server 2000 and I would to know the open DB name
into a stored procedure.
Any suggestion?
FluidoYou can get the current database name with DB_NAME(). For example:
SELECT DB_NAME()
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Fluido" <simone.79@.tiscali.it> wrote in message
news:8484a1df.0407150515.68e8cd70@.posting.google.com...
> I'm working on SQL Server 2000 and I would to know the open DB name
> into a stored procedure.
> Any suggestion?
> Fluido

No comments:

Post a Comment