Site icon Database Tutorials

SET LANGUAGE and @@LANGUAGE Function in SQL Server(TSQL)

 

We can set a session’s language With SET LANGUAGE Command. This command affects the system datetime format and system messages.

If you want to learn the session’s language, you can do this with @@LANGUAGE function.

Example:

We set the language as English, then we get the language name and current month name in the First Part.

We repeat the same process for French in the Second Part.

Finally we get the information about all languages with sys.syslanguages.

Exit mobile version