Geeky/Programming SQLServerPedia Syndication

SQL Server: SELECT Current Database Name

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: , , , , ,

By Steve Novoselac

Director of Digital Technology @TrekBikes, Father, Musician, Cyclist, Homebrewer

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.