The SQL LANGUAGE is one of the Set Function, which will set the Language or change the default language. This Set language Statement determines the system message and DateTime format. The basic syntax of the SET LANGUAGE is as shown below:
SET LANGUAGE Language_Name -- For example, SET LANGUAGE French;
SQL SET LANGUAGE Example
In this example, we will show you, How the SET LANGUAGE in SQL Server will affect the DateTime and message formats. If you find it challenging to understand the language names, then use sp_helplanguage stored procedure.
SELECT DATENAME(month, GETDATE()) AS 'Month Name' SET LANGUAGE French SELECT DATENAME(month, GETDATE()) AS 'Month Name' SET LANGUAGE Italian SELECT DATENAME(month, GETDATE()) AS 'Month Name'
OUTPUT
Let me show you the SQL Server system messages. For this, we are selecting divide by zero statement
SET LANGUAGE English SELECT 1/0 SET LANGUAGE French SELECT 1/0 SET LANGUAGE Italian SELECT 1/0
You can see the message in different languages.