@@LANGUAGE (Transact-SQL)@@LANGUAGE (Transact-SQL)

適用於: 是SQL Server 是Azure SQL Database 是Azure SQL 資料倉儲 是平行處理資料倉儲 APPLIES TO: yesSQL Server yesAzure SQL Database yesAzure SQL Data Warehouse yesParallel Data Warehouse

傳回目前所用的語言名稱。Returns the name of the language currently being used.

主題連結圖示 Transact-SQL 語法慣例Topic link icon Transact-SQL Syntax Conventions

語法Syntax

@@LANGUAGE  

傳回類型Return Types

nvarcharnvarchar

RemarksRemarks

若要檢視有關語言設定的資訊 (包括有效的官方語言名稱),請執行沒有指定參數的 sp_helplanguageTo view information about language settings, including valid official language names, run sp_helplanguage without a parameter specified.

範例Examples

下列範例會傳回目前工作階段的語言。The following example returns the language for the current session.

SELECT @@LANGUAGE AS 'Language Name';  

以下為結果集:Here is the result set.

Language Name                   
------------------------------  
us_english                      

另請參閱See Also

組態函式 (Transact-SQL) Configuration Functions (Transact-SQL)
SET LANGUAGE (Transact-SQL) SET LANGUAGE (Transact-SQL)
sp_helplanguage (Transact-SQL)sp_helplanguage (Transact-SQL)