Most major RDBMSs provide at least one function that enables us to return the month name from a date.
SQL Server
How to Install SQL Server on an M1 Mac (ARM64)
Update January 2026: When I wrote this article in 2021, the full SQL Server image couldn’t be installed on Apple Silicon machines (the M1 Macs). We had to install SQL Edge instead, which is why I wrote this article. Fortunately, things have progressed since then, and we can now install the full SQL Server image on Apple Silicon machines (including M1, M2, M3, M4).
Therefore, I recommend you read How to Install SQL Server on a Mac in 2026 instead of this article. It’s a very similar process to the one outlined in this article, but it actually installs SQL Server instead of SQL Edge (which has since been retired).
Change a Login’s Default Language in SQL Server
In SQL Server, you can use the ALTER LOGIN statement to change the default language for a specific login.
Doing this will ensure that whenever that login connects to SQL Server, all date/time formats and system messages are presented in the correct format and language.
Get the Current Login ID in SQL Server (T-SQL)
You can use the SUSER_ID() function to return the login identification number of the current user.
You can also use it to return the login ID of another user.
This is similar to returning the current login name, except here we’re returning the ID instead.
Return the Current Workstation Name that’s Connected to SQL Server (T-SQL)
Occasionally you might find yourself in the situation where you need to get the name of the current workstation that’s connected to SQL Server.
For example, maybe you have a stored procedure that inserts data, and you want to record the name of the workstation that inserted the data.
In such cases, you can use the HOST_NAME() function.
This is not to be confused with getting the server name.
Change the Time Zone Offset on a datetimeoffset Value in SQL Server (T-SQL)
You can use the SWITCHOFFSET() function in SQL Server to change the time zone offset on a datetimeoffset value.
The function accepts two arguments; a datetimeoffset(n) value (or an expression that can be resolved to a datetimeoffset(n) value), and the new time zone.
Replace Multiple Characters in a String in SQL Server (T-SQL)
In SQL Server, the REPLACE() function enables us to replace a string with another string. But what if you want to replace a list of characters with another list of characters?
The TRANSLATE() function might help.
How to do a DELETE Pass-Through Query in SQL Server
In SQL Server, the OPENQUERY rowset function enables you to execute a pass-through query on a linked server.
OPENQUERY is commonly referenced in the FROM clause of a query as if it were a table, but it can also be referenced as the target table of an INSERT, UPDATE, or DELETE statement.
This article presents an example of using OPENQUERY to do an DELETE pass-through query.
Restore a SQL Server Database (T-SQL)
If you use SQL Server Management Studio (SSMS) or some other GUI to manage your databases, you might be used to backing up and restoring databases using “point and click”.
Usually this involves right-clicking on the database and selecting Restore or similar, then following the prompts (for example, when restoring a database in Azure Data Studio).
But if you ever need to do it with T-SQL, you can use the RESTORE DATABASE statement.
Get the Language Currently Being Used in SQL Server
There are several ways to get the language currently being used in SQL Server.
The language of the current session will often be the default language for the login, but this is not necessarily always the case. A user can change the current language during the session.
Also, some of SQL Server’s built-in functions accept an argument that allows you to specify a language for that specific query.
This article shows you how to return the language currently being used.