Some useful SQL Server configuration functions are:
@@SERVERNAME, @@VERSION, @@SPID & @@LANGUAGE
1. @@SERVERNAME:
This function returns local server name that is currently running SQL Server.
Syntax:
SELECT @@SERVERNAME AS 'Current Server Name'

2. @@VERSION:
It is used to return current SQL Server version details like Edition, Installation date, Operating system version, Processor architecture and Copyright statement.
Syntax: SELECT @@VERSION AS 'SQL Server Version'

3. @@SPID:
It is used to return currently running SQL Server Session id.
Syntax: SELECT @@SPID AS 'SPID', SYSTEM_USER AS 'LoginName', USER AS 'UserName';
4. @@LANGUAGE:
It is used to return the name of the language that is currently used in SQL Server.
Syntax: SELECT @@LANGUAGE AS 'Language Name'

Hope you enjoyed the post. Your valuable feedback, question, or comments about this post are always welcome or you can leave us message on our contact form , we will revert to you asap.
Recommended SQL Server Post:
Query Optimization Technique in SQL Server
Identity functions in SQL Server
![]()


