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 @@SERVERNAME is shown below.
@@SERVERNAME
The code snippet below will show you the instance of the SQL Server that we are currently using. Please refer to the SQL @@SERVICENAME article from our SQL tutorial page.
SELECT @@SERVERNAME AS 'Server Name'
