SELECT @@SERVERNAME as [@@SERVERNAME], SERVERPROPERTY('MachineName') MachineName, SERVERPROPERTY('InstanceName') InstanceName, SERVERPROPERTY('ServerName') ServerName, SERVERPROPERTY('ComputerNamePhysicalNetBIOS') PhysicalNetBIOS
结果
@@SERVERNAME MachineName InstanceName ServerName PhysicalNetBIOS JerryPC\MSSQLSERVER2014 JerryPC MSSQLSERVER2014 JerryPC JerryPC