@@LANGID (Transact-SQL)

@@LANGID (Transact-SQL)

 

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)yesAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Returns the local language identifier (ID) of the language that is currently being used.

Topic link icon 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'  

Here is the result set.

Changed language setting to Italiano.  
Language ID  
-----------  
6            

Configuration Functions (Transact-SQL)
SET LANGUAGE (Transact-SQL)
sp_helplanguage (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft