| title | @@LANGID (Transact-SQL) | Microsoft Docs | |||||
|---|---|---|---|---|---|---|
| ms.custom | ||||||
| ms.date | 03/13/2017 | |||||
| ms.prod | sql-non-specified | |||||
| ms.reviewer | ||||||
| ms.suite | ||||||
| ms.technology |
|
|||||
| ms.tgt_pltfrm | ||||||
| ms.topic | language-reference | |||||
| f1_keywords |
|
|||||
| dev_langs |
|
|||||
| helpviewer_keywords |
|
|||||
| ms.assetid | 7a0fc089-2a48-4a81-9d78-2aaedb540d37 | |||||
| caps.latest.revision | 30 | |||||
| author | BYHAM | |||||
| ms.author | rickbyh | |||||
| manager | jhubbard |
[!INCLUDEtsql-appliesto-ss2008-asdb-xxxx-xxx_md]
Returns the local language identifier (ID) of the language that is currently being used.
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)