The Bit Bucket

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

Book Review: Don't Give Your Work Away for Free

I was intrigued to see a book called Don’t Give Your Work Away for Free by Thaddeus Cooper and Dr Frederick Von Greensburg. I thought I should check it out.

The authors start out by discussing how employment typically works today. You have a timeline to do work, you go there for the time, and you are paid for going there.

While I have done that sort of work over the years, it’s certainly not how I prefer to work. I far prefer a project value basis where I determine with the client what needs to be done, work out the value that it will provide, and provide them with a price to achieve that outcome. How and when I get that done is then up to me.

2025-06-23

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

SSMS Tips and Tricks 2-8: Scroll bar map mode

In another section, I’ve described ways to configure the scroll bar in SQL Server Management Studio (SSMS). There is another key option that I haven’t discussed previously: map mode. By default, the scroll bar shows the changes, syntax errors, etc:

If you have a long script though, it can be hard to visualize what’s in the other parts of the script. Map mode can help with this.

Right-click the scroll bar and choose Scroll Bar Options:

2025-06-16