Create a Database in SQL Server (T-SQL)

Many developers and database administrators create databases using GUI tools such as SQL Server Management Studio (SSMS), Azure Data Studio, etc.

But it can be much quicker to create databases using SQL. This is especially true if you have various environments that you need to recreate the same database on. You can run the same script against each environment, and the database will be created within seconds each time.

In SQL Server, we do this with T-SQL. T-SQL stands for Transact-SQL, and it is SQL Server’s extension to SQL.

Below is an example of using T-SQL to create a database in SQL Server.

Continue reading

Change the Language for the Current Session in SQL Server

You may know that when you connect to SQL Server, the language for that session is usually determined by your login. When a login is created, it is assigned a default language.

The session language determines the datetime formats and system messages.

While you can certainly change the default language for a login, you can also override the default language within a session if you need to. You can toggle back and forth between languages if required. Or you could even open two separate connections and apply a different language to each of them.

This article explains how to change the language within a session.

Continue reading