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
 SQL Server Development (2000)
 Determine Database Name

Author  Topic 

sillybus
Starting Member

13 Posts

Posted - 2001-05-23 : 00:39:15
Ok, I know how to determine what the name of the current server is through @@servername but does anyone know of a way to determine the name of the database currently in use executing a stored procedure within the code? For example, if I was in the Northwind db, is there somewhere I can get a string to return the value 'Northwind'?

   

- Advertisement -