Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 2.05 KB

File metadata and controls

65 lines (51 loc) · 2.05 KB
title @@LANGID (Transact-SQL)
description @@LANGID (Transact-SQL)
author markingmyname
ms.author maghan
ms.date 09/18/2017
ms.prod sql
ms.technology t-sql
ms.topic reference
f1_keywords
@@LANGID
@@LANGID_TSQL
helpviewer_keywords
languages [SQL Server], current in use
@@LANGID function
current language in use
ID for language in use
local language IDs [SQL Server]
dev_langs
TSQL

@@LANGID (Transact-SQL)

[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance]

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

Topic link icon Transact-SQL Syntax Conventions

Syntax

@@LANGID  

[!INCLUDEsql-server-tsql-previous-offline-documentation]

Return Types

smallint

Remarks

To view information about language settings, including language ID numbers, run sp_helplanguage without a parameter specified.

Examples

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            

See Also

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