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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-03-17 : 08:17:50
|
| Mike writes "Is there a function or variable that exists that will tell me the name of the database I am currently using? For instance, @@ServerName will give me the name of the database server. Will something give me the name of the current database?" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2006-03-17 : 08:17:58
|
| SELECT db_name() |
 |
|
|
|
|
|