T-SQL Tuesday 177: Managing database code
I am excited to host the T-SQL Tuesday blog party for August 2024. I’ve done this many times, but I always remember when I was new to the community...
2024-08-07
56 reads
I am excited to host the T-SQL Tuesday blog party for August 2024. I’ve done this many times, but I always remember when I was new to the community...
2024-08-07
56 reads
The third episode of Simple Talks is out. This is the new Redgate podcast from myself, Grant, Ryan, and Louis. The main page is here, and it has links...
2024-08-07
102 reads
From the team at Jetpack AI comes a new tool that will improve your writing in a flash.
2024-08-08 (first published: 2024-08-06)
46 reads
The Problem While performing an instance migration this spring, I happened upon something I didn’t expect in [dbatools](https://dbatools.io/). It should have been a simple backup/restore copy of the databases,...
2024-08-16 (first published: 2024-08-06)
285 reads
There is a new index feature in Redgate Monitor, but it’s disabled by default. This post shows how to enable things. This is part of a series of posts...
2024-08-19 (first published: 2024-08-05)
150 reads
The final 2024 Redgate Summit in the US takes place in a few weeks, on Aug 21. Redgate Summit: The Database Landscape is coming to the Microsoft Office at...
2024-08-05
31 reads
I’m still learning PostgreSQL and one of the things I’ve been looking at a lot lately is instrumentation. What do I mean? Well, if you’re in SQL Server, think,...
2024-08-23 (first published: 2024-08-05)
166 reads
In my last article - Identify Tables With Dropped Columns - we saw how we can identify tables that have columns that were dropped. Today, we are going to...
2024-08-05
63 reads
No matter how hard Azure Data Studio (ADS) is pushed by Microsoft, most DBAs still use SQL Server Management Studio (SSMS). In this blog post, I’ll go through my...
2024-08-14 (first published: 2024-08-03)
903 reads
bareleveling – v. trying to improve yourself without anyone else knowing about it, afraid that they’ll think it’s silly or grandiose or unnecessary, or that they’’ll end up calling...
2024-08-02
38 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