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
Today I am officially announcing the launch of my first all-day SQL Saturday Pre-Conference training session entitled “Virtualization for SQL...
2013-10-30
1,221 reads
What is PowerPivot for Excel? PowerPivot brings the power of Data Modelling into your PC. Traditionally, the DataWarehouse is built...
2013-10-30
1,668 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
By Steve Bolton
…………In order to divide the Herculean task of describing custom algorithms into bite-sized chunks, I omitted discussion of...
2013-11-04 (first published: 2013-10-30)
2,794 reads
I just posted a new version of sp_BackupDatabases. The biggest change is that the procedure now creates one-time SQL Agent...
2013-10-29
1,627 reads
(Be sure to checkout the SQLpassion Online Academy, where you get High-Quality SQL Server Trainings with Instant Access!)
Cardinality Estimation is...
2013-11-01 (first published: 2013-10-29)
3,529 reads
Not much news came out of the PASS Summit 2013 from last week, but boy did I have a blast! I...
2013-10-29
1,131 reads
Let’s have some fun.
This Friday, November 1, 2013, I’m putting on an all day seminar on query tuning. It’s set...
2013-10-29
678 reads
Startup Weekend comes to Orlando on Nov 22-24, 2013. I haven’t been (and not sure I will make this one)...
2013-10-29
757 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