2018-04-20
2018-04-20
For one of my clients, I needed to know and document not only database names, size and locations but also...
2018-04-19
596 reads
When you restore a database, it will also restore all permissions along with it. But what if you are restoring...
2018-04-19
12,393 reads
I was working for a client on their very critical and heavily used database. The application was an E-commerce website...
2018-04-19
7,993 reads
If you ever had a need to start a SQL job using sp_start_job stored procedure in msdb then you know...
2018-04-19
15,875 reads
A quick post on SQL Prompt here. Someone is asking about the Prompt Actions menu. This is the menu that...
2018-04-19
996 reads
SQL Server backups, in itself, is a vast subject; so vast, there are multiple books written about them. In this...
2018-04-19
541 reads
I have previously written about using Transparent Data Encryption (TDE) with Azure Key Vaule as a great way to store...
2018-04-30 (first published: 2018-04-19)
2,116 reads
In this module you will learn how to use the Drill-Down Donut Chart. The Drill-Down Donut Chart allows you to...
2018-05-01 (first published: 2018-04-19)
3,519 reads
In the previous blog, we discussed the Foreign Keys Constraints and how the CHECK Constraints are useful to verify the...
2018-04-30 (first published: 2018-04-19)
3,169 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