Jun 2026 Discount: Comprehensive Database Performance Health Check | Testimonials

Home
  • Consulting
  • Training
  • Free Videos
  • All Articles
    • Interview Questions and Answers
    • SQL Tips and Tricks
    • SQL Performance
    • SQL Puzzle
    • Big Data
    • Blog Stats
    • SQL Books
  • Hire Me
  • Health Check

SQL SERVER – Get Current Database Name

February 12, 2008
Pinal Dave
SQL, SQL Server, SQL Tips and Tricks
SQL Scripts
Yesterday while I was writing script for SQL SERVER – 2005 – Find Unused Indexes of Current Database . I realized that I needed SELECT statement where I get the name of the current Database. It was very simple script. SELECT DB_NAME() AS DataBaseName It will give you the name…
Read More
  • SQL Interview Q & A
  • Testimonials
  • Search
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com

Go to mobile version