Adding a column to a table with a default (NULL vs NOT NULL)
There are lots of ways to learn new things, or be reminded of old things. One of my favorites is...
2013-11-05 (first published: 2013-10-30)
5,181 reads
There are lots of ways to learn new things, or be reminded of old things. One of my favorites is...
2013-11-05 (first published: 2013-10-30)
5,181 reads
Microsoft has introduced an image into the Windows Azure Virtual Machine Gallery that is pre-optimized for a Fast Track Data...
2013-11-05
1,466 reads
I’m very passionate about security, especially database security. As the numbers with regards to data breaches continue to climb, this...
2013-11-05 (first published: 2013-10-30)
2,732 reads
I am about to set sail on a new venture with my next official whistle stop. This year has been plenty full of whistle stops and I plan on...
2013-11-05
8 reads
I am about to set sail on a new venture with my next official whistle stop. This year has been...
2013-11-05
788 reads
Welcome to this month’s (November 2013) edition of T-SQL Tuesday. For those not familiar this is rotating blog party that was started by Adam Machanic (@AdamMachanic | blog) back...
2013-11-05
15 reads
Welcome to this month’s (November 2013) edition of T-SQL Tuesday. For those not familiar this is rotating blog party that...
2013-11-05
688 reads
Welcome to this month’s (November 2013) edition of T-SQL Tuesday. For those not familiar this is rotating blog party that was started by Adam Machanic (@AdamMachanic | blog) back...
2013-11-05
16 reads
I have text file that contains data for a given fiscal period. In this
particular file there are around 2 million records. The file needs to be
split into...
2013-11-05
21 reads
I have text file that contains data for a given fiscal period. In this
particular file there are around 2 million records. The file needs to be
split into...
2013-11-05
18 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