@@SERVERNAME TSQL Tutorial

This function returns the name of the local server that is running SQL Server.

@@SERVERNAME Syntax

@@SERVERNAME;

@@SERVERNAME Example

SELECT @@SERVERNAME AS 'Local Server Name';

Local Server Name
TEST

See also:
T-SQL Functions -> @@SERVICENAME