T-SQL Tuesday #199: Roundup
A good week ago I hosted the monthly T-SQL Tuesday blog party. I invited the community the blog about the idea of what would happen if we would need...
2026-06-19 (first published: 2026-06-18)
53 reads
A good week ago I hosted the monthly T-SQL Tuesday blog party. I invited the community the blog about the idea of what would happen if we would need...
2026-06-19 (first published: 2026-06-18)
53 reads
I was messing around with SQLCMD and I realized something I hadn’t known. I’ve never tried it, but the batch separator has to be separate, which I’ll show. Another...
2026-07-08 (first published: 2026-06-17)
307 reads
One of the first things I review when I inherit a new SQL Server environment is the SQL Agent jobs. I can learn a tremendous amount about an organization...
2026-07-01 (first published: 2026-06-16)
568 reads
It’s 07:43. Someone’s already left a message. “Something’s wrong with the DB server.” You open the terminal and go to work. This post is about what happens next —...
2026-06-16
200 reads
I’ve had a Dropbox account for years. Like a lot of people, I started using it when it was one of the easiest ways to sync files across machines...
2026-06-16 (first published: 2026-06-15)
168 reads
Someone hacked Digitown's municipality and stole classified documents. 45 million rows of router traffic, an IP lookup table, and KQL's anomaly detection to find who did it.
2026-06-29 (first published: 2026-06-15)
175 reads
Hello Hello, We. Are. Back! The schedule for EightKB 2026 Edition has been announced! We’re kicking off at 1pm UTC on August 20th…here’s the schedule: – N.B. – If...
2026-06-26 (first published: 2026-06-15)
132 reads
You paste a slow Redshift query plan into PlanTrace and one of the tuning insights reads "SORTKEY optimization candidate", pointing at an explicit sort step that's adding cost you...
2026-06-15
46 reads
As part of my running the SQL Saturday charitable foundation, I get sponsorship money from vendors. Primarily Microsoft and AMD, but I hope to change that in the future....
2026-06-15
39 reads
Reading tutorials is fine. Shipping something is better. If you are trying to break into data engineering or AI, nothing on your resume carries more weight than a GitHub...
2026-06-29 (first published: 2026-06-12)
559 reads
By Steve Jones
I use ConEmu for my terminal interface. I’m still on Windows 10 at home,...
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...
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