SQL Server @@Language is a configuration function that returns the name of the language currently being used.
SYNTAX
@@LANGUAGE
Return Type of @@LANGUAGE is nvarchar.
Lets look at an example showing functionality of @@Language function in SQL Server.
Following statement uses @@language function and returns the language name that is currently being used by SQL Server.
SELECT @@LANGUAGE AS 'Language Name';
As you can see, it returns current language ‘us_english’.
You can also change the default language for SQL Server using SET language function.
Lets change the SQL Server Current Language from US English to Spanish.
SET LANGUAGE Spanish; SELECT @@LANGUAGE AS 'Language Name'
You can also see the list of valid official languages supported by SQL Server, using stored procedureย sp_helplanguage.
EXEC sp_helplanguage;
As you can see, it returns the detailed information about all languages supported by SQL Server.
Also Read..
1,670 total views, 1 views today