Dates and Times in SQL Server: DATETIME
Last year I ran a series of posts about Database Fundamentals. Over the next few weeks, I will cover the...
2018-02-21
341 reads
Last year I ran a series of posts about Database Fundamentals. Over the next few weeks, I will cover the...
2018-02-21
341 reads
Nested views are bad. Let’s get that out of the way. What is a nested view anyway? Imagine that you...
2018-02-14
2,379 reads
Tom Roush The SQL Family lost a much admired member to cancer last month, Tom Roush. In our little community,...
2018-02-07
398 reads
Victoria is on an island off the coast of Vancouver, British Columbia. The island is wisely called Vancouver Island. It...
2018-01-31
526 reads
As I mentioned a couple of weeks ago, I will be presenting for the first time at SQLBits in London,...
2018-01-24
334 reads
By now you have probably seen the news about a major flaw in the design of CPUs from all major...
2018-01-17
339 reads
A year ago, I wrote in a post that cloud computing is just someone else’s data center. I was wrong. Whether...
2018-01-10
372 reads
I have been working on a new information session, which I’m hoping to deliver this year. It’s about one of...
2018-01-03
312 reads
In November 2017, during the PASS Summit keynote, Microsoft’s Bob Ward (Principal Architect) demonstrated a “diskless database” running on Hewlett-Packard...
2017-12-27
376 reads
A quick post this week, since it’s that time of the year when people do gift exchanges and put up...
2017-12-20
378 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