SQL @@SERVERNAME

The @@SERVERNAME is one of the Configuration Functions, which will return the local server name that is currently running the SQL Server.

The Syntax behind this SQL @@SERVERNAME is shown below.

@@SERVERNAME

The below code snippet will show you the instance of the SQL Server that we are currently using.

SELECT @@SERVERNAME AS 'Server Name'
SQL @@SERVERNAME 1

About Suresh

Suresh is the founder of TutorialGateway and a freelance software developer. He specialized in Designing and Developing Windows and Web applications. The experience he gained in Programming and BI integration, and reporting tools translates into this blog. You can find him on Facebook or Twitter.