SQL Server: SELECT Current Database Name
Jul.17, 2007 in
Geeky/Programming
As a short follow up to a post I did a little while ago on SELECT’ing the instance and machine names from SQL Server, here is how you get the Current Database Name
SELECT db_name()
Funny because I was looking for that online, and my Google search led me to my past blog post, so I figured I would actually blog about this specific function as well.
Technorati tags: SQL Server, SQL Server 2005, Current Database Name, Database Name, db_name(), SELECT
Tags: SQL
Simlar Posts

Leave a Reply