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.
| Author |
Topic |
|
smcgrath
Starting Member
1 Post |
Posted - 2002-04-22 : 12:47:52
|
Is there any way I can use a stored procedure to give me back the nameof the database I am currently in??? |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-04-22 : 12:57:18
|
| You can use the DB_NAME() function:USE pubsSELECT DB_NAME() --returns pubs |
 |
|
|
|
|
|