Capturing My Own Metrics: #SQLNewBlogger
A customer was trying to compare two tables and capture a state as a performance metric. In this case, they were wanting to use Redgate Monitor and custom metrics,...
2026-07-08
437 reads
A customer was trying to compare two tables and capture a state as a performance metric. In this case, they were wanting to use Redgate Monitor and custom metrics,...
2026-07-08
437 reads
When I'm looking at a query, I bet it's bad if I see... a shopping list of red flags I've learned to spot, from AI-generated code to SSMS map...
2026-07-17 (first published: 2026-07-07)
1,534 reads
This month is a milestone for T-SQL Tuesday. It’s number 200, which doesn’t sound big, but this is a monthly party (started by Adam Machanic). We have 12 blog...
2026-07-07
56 reads
The idea behind Fabric OneLake Security (which GA’d on April 2026) is to centralize data access controls at the data layer, rather than configuring security separately for every Fabric...
2026-07-06
77 reads
The DBA life is fraught with pain. Those battles that we endure are mostly invisible to many. Those countless sleepness nights are a testament to our dedication. Whether that...
2026-07-15 (first published: 2026-07-06)
645 reads
Every PostgreSQL migration eventually hits the same fork in the road. The database is small enough to dump and restore in a maintenance window, or it isn't. Once you...
2026-07-15 (first published: 2026-07-03)
271 reads
I’m off on vacation today. Which is a little weird as I just got back from a week long vacation in May, cruising with my family. Usually my trips...
2026-07-03
40 reads
Every DBA has a box like this. Sitting untouched for months. Nobody’s proud of it, nobody’s fixed it, it’s just there — a handful of small compliance gaps that...
2026-07-03 (first published: 2026-07-02)
61 reads
In all recent versions of the database you can call DBMS_UTILITY.EXPAND_SQL_TEXT to get the “true” version of a SQL that the database will run. It takes your SQL as...
2026-07-03 (first published: 2026-07-02)
132 reads
I type fairly well. Well, I type fast, but I do wear out a backspace key relatively quickly on most keyboards. That and a space bar. AI helps me...
2026-07-01
49 reads
Creating a Fabric workspace takes about 30 seconds. Restructuring workspaces after people have built...
By Steve Jones
It’s a small change, but a handy one. Flyway Desktop (FWD) now includes the...
By Steve Jones
Software is hard. While I love our Lucid Gravity, I realize that they are...
Comments posted to this topic are about the item Adding new column with DEFAULT...
Comments posted to this topic are about the item Advanced Deployment Scenarios: Stairway to...
Comments posted to this topic are about the item You Need a DBA Pipeline
Which number did the two COUNT(*) return:
DROP TABLE IF EXISTS #tmp CREATE TABLE #tmp (id INT NOT NULL) INSERT INTO #tmp (id) SELECT gs.value FROM GENERATE_SERIES(1, 5) AS gs ALTER TABLE #tmp ADD my_value INT NOT NULL CONSTRAINT df_tmp_my_value DEFAULT 1 SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1 ALTER TABLE #tmp DROP CONSTRAINT df_tmp_my_value ALTER TABLE #tmp ADD CONSTRAINT df_tmp_my_value DEFAULT 2 FOR my_value SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1See possible answers