SmartPaster
I recently discovered this great little free Visual Studio Add-in that allows pasting text as preformatted strings in VB or...
2012-02-02
824 reads
I recently discovered this great little free Visual Studio Add-in that allows pasting text as preformatted strings in VB or...
2012-02-02
824 reads
I just ran into an issue with one of my applications where a SQL statement had updated a status code...
2012-01-19
2,835 reads
This will be a series of handy hints for people that know SQL and are frustrated by Excel. I am...
2011-12-06
2,122 reads
Full disclosure: There might be a better way to do this. I am not aware of it.
Problems:
Maintaining multiple DB environments...
2011-11-03
1,474 reads
One of the databases that I support reports all money values in both the local currency and US Dollars. Very...
2011-10-28
15,201 reads
Tobias Ternstrom from Microsoft gave a great talk at Tech Ed regarding upcoming features of SQL Server Denali. His presentation...
2011-06-30
2,227 reads
(Yet another boring org chart example – except this one has multiple roots)
One of my apps has a hierarchial org chart...
2011-05-18
1,707 reads
If you want to test if you’re currently debugging an SSIS package via BIDS/Visual Studio, or running normally via DTExec,...
2011-04-28
2,417 reads
I was recently working on a data cleanup problem where I had to do lots of comparisons of one row...
2011-02-24
2,097 reads
I was recently working on a data cleanup problem where I had to do lots of comparisons of one row...
2011-02-18
4,334 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