Export (0) Print
Expand All
Expand Minimize


Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Specifies the language environment for the session. The session language determines the datetime formats and system messages.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database.

Topic link icon Transact-SQL Syntax Conventions

SET LANGUAGE { [ N ] 'language' | @language_var } 

[N]'language' | @language_var

Is the name of the language as stored in sys.syslanguages. This argument can be either Unicode or DBCS converted to Unicode. To specify a language in Unicode, use N'language'. If specified as a variable, the variable must be sysname.

The setting of SET LANGUAGE is set at execute or run time and not at parse time.

SET LANGUAGE implicitly sets the setting of SET DATEFORMAT.

Requires membership in the public role.

The following example sets the default language to Italian, displays the month name, and then switches back to us_english and displays the month name again.

SET @Today = '12/5/2007';

SELECT DATENAME(month, @Today) AS 'Month Name';

SET LANGUAGE us_english;
SELECT DATENAME(month, @Today) AS 'Month Name' ;
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft