Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Finding the database name in a stored procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-12-02 : 08:28:34
shruti writes "I want to make a generic stored procedure in which I need to use the name of the database I am currently on.
For eg. If I get the name of the database as 'XXX', I have to do some changes in one of the tables.
How do I get the database name."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-12-02 : 08:28:48
Look up the DB_NAME() function in Books Online.
Go to Top of Page
   

- Advertisement -