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
Categories SQL