ABS
ALL
AND
ANY
AVG
bit
COS
COT
DAY
EXP
GO
IN
LEN
LOG
MAX
MIN
NOT
OR
PI
SET
SIN
STR
SUM
TAN
USE
VAR
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

@@SERVICENAME

SQL Server 2000

Returns the name of the registry key under which Microsoft® SQL Server™ is running. @@SERVICENAME returns MSSQLServer if the current instance is the default instance; this function returns the instance name if the current instance is a named instance.

Syntax

@@SERVICENAME

Return Types

nvarchar

Remarks

SQL Server runs as a service named MSSQLServer on Microsoft Windows NT®. It does not run as a service on Windows® 98 because the operating system does not support services.

Examples
SELECT @@SERVICENAME

Here is the result set:

------------------------------ 
MSSQLServer

See Also

Configuration Functions

MSSQLServer Service

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.