Tutorial Gateway

  • C Language
  • Java
  • R
  • SQL
  • MySQL
  • Python
  • BI Tools
    • Informatica
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • QlikView
  • Js

SQL LANGUAGE

by suresh

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.

This article will show you, How to use the SQL Server SET LANGUAGE with example. Before we get into the example, let us see the syntax behind this:

SQL LANGUAGE Syntax

The basic syntax of the SQL Server 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 difficult 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

SQL LANGUAGE Example 1

Let me show you the 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.

SQL LANGUAGE Example 2

Thank You for Visiting Our Blog

Placed Under: SQL

Stay in Touch!

Sign Up to receive Email updates on Latest Tutorials

  • C Programs
  • Java Programs
  • SQL FAQ’s
  • Python Programs
  • SSIS
  • Tableau
  • JavaScript

Copyright © 2019 | Tutorial Gateway· All Rights Reserved by Suresh

Home | About Us | Contact Us | Privacy Policy