Sql-Server

SSMS Tips and Tricks 3-1: Using line numbers and Go To

If you ever have long scripts in SQL Server Management Studio and need to refer to a particular line, it can be helpful to have line numbers shown. This is even more useful if you ever need to write a set of instructions for someone on how to modify a query, or if you are trying to describe how a query works.

Instead of having a query like this:

2025-06-28

SSMS Tips and Tricks 2-13: Using environment color themes

One feature that many developers have been asking the SSMS team for, is the ability to use a dark mode.

Instead of a screen that looks like this:

They wanted a screen that looks like this:

This capability is now present in SSMS. In Tools then Options then Environment then General, you can now choose a Color Theme:

Note that there are several themes now available, including a new extra contrast option.

2025-06-26

SQL Interview: 58 Trigger Firing Order

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Administration Level: Advanced

Question:

If a SQL Server table has six triggers associated with it, what control do you have over the order that the triggers fire in?

Answer:

SQL Server doesn’t provide an option to control trigger firing order. However, it does provide an option to choose the first trigger to fire, and the last trigger to fire.

2025-06-25

SSMS Tips and Tricks 2-12: Using zoom features

When working with SQL Server Management Studio, sometimes you need to show someone else what you’re working on, and the fonts that you’re using are just too small for someone looking over your shoulder or looking at a screen that you’ve shared with them.

What I often see someone do then, is to go into Tools and Options and start to change the font and color settings. The pain with this is that you then need to set them back later.

2025-06-24

SSMS Tips and Tricks 2-11: Use visual glyphs for word wrap

Code quality has always been an important topic ever since coding began. Code complexity is an important part of this. One of the topics that came up many years ago was a discussion on what length procedures or functions should be, before they became too difficult to follow.

I remember one guy commenting that he thought as soon as all the code didn’t fit on your screen any more, you were much more likely to have bugs in it. At the time, screens weren’t all that big.

2025-06-22

SQL Interview: 57 Query Stuck

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Administration Level: Medium

Question:

The CPU of a SQL Server is at 2%. Very little I/O is happening.

A query has been running for a long time, and seems stuck i.e., doesn’t seem to be doing anything, what’s likely to be the issue?

2025-06-21

SSMS Tips and Tricks 2-10: Toggle full screen

SSMS is a great tool and it has lots of helpful menu items and toolbar items. Unfortunately, all these items take up screen real estate.

Even though you can get more screen real estate for editing, by unpinning the windows on each side, you can see that the default screen layout could be considered a bit cluttered if you really just want to focus on the particular query that you’re working on.

2025-06-20

SQL: Different Thinking is Needed for New Azure SQL DB Features

A few days ago, I wrote about the new Standard Developer Edition of SQL Server 2025 and what good news it was. I noted that the need for it had reduced since SQL Server 2016 SP1 but it was still helpful.

While the product group management did a good job with SQL Server 2016 SP1, others in the product group don’t seem to have remembered those lessons. The team keeps releasing features that only work on particular SKUs of Azure SQL Database.

2025-06-19

SSMS Tips and Tricks 2-9: Adding multi-level undo, redo

Years ago, I had the privilege of presenting “what’s new in SQL Server” sessions at many locations around the world. When presenting sessions, you can sometimes learn as much as you teach. What I learned while delivering those sessions is that the product group sees what’s important in a release very differently to what the attendees do.

Each time there’s a new version of SQL Server, there will normally be three or four marketing pillars (groups of functionality), and each will have about eight to ten bullet points.

2025-06-18

SQL Interview: 56 String Concatenation Operators

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Development Level: Intro

Question:

You are writing Azure SQL Database code that needs to concatenate strings.

You have previously used the + operator to do this.

Which other operator can be used for concatenating strings?

Answer:

Azure SQL Database supports the double-pipe || operator for string concatenation.

2025-06-17