SET LANGUAGE (Transact-SQL)
SQL Server 2008 R2
Specifies the language environment for the session. The session language determines the datetime formats and system messages.
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.
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.
DECLARE @Today DATETIME SET @Today = '12/5/2007' SET LANGUAGE Italian SELECT DATENAME(month, @Today) AS 'Month Name' SET LANGUAGE us_english SELECT DATENAME(month, @Today) AS 'Month Name' GO