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