| title | @@LANGID (Transact-SQL) | |||||
|---|---|---|---|---|---|---|
| description | @@LANGID (Transact-SQL) | |||||
| author | markingmyname | |||||
| ms.author | maghan | |||||
| ms.date | 09/18/2017 | |||||
| ms.service | sql | |||||
| ms.subservice | t-sql | |||||
| ms.topic | reference | |||||
| ms.custom |
|
|||||
| f1_keywords |
|
|||||
| helpviewer_keywords |
|
|||||
| dev_langs |
|
[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance FabricSQLDB]
Returns the local language identifier (ID) of the language that is currently being used.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
@@LANGID
smallint
To view information about language settings, including language ID numbers, run sp_helplanguage without a parameter specified.
The following example sets the language for the current session to Italian, and then uses @@LANGID to return the ID for Italian.
SET LANGUAGE 'Italian'
SELECT @@LANGID AS 'Language ID' [!INCLUDEssResult]
Changed language setting to Italiano.
Language ID
-----------
6
Configuration Functions (Transact-SQL)
SET LANGUAGE (Transact-SQL)
sp_helplanguage (Transact-SQL)