Returns the name of the local server running Microsoft® SQL Server™.
@@SERVERNAME
nvarchar
The Setup program sets the server name to the computer name during installation. You can change @@SERVERNAME by using sp_addserver and then restarting SQL Server; although this method is not usually required.
SELECT @@SERVERNAME
sp_addserver | Configuration Functions |