T-SQL - Finding Changes
Someone posted a note recently asking about how to detect the changes in a sequence. Say you have a table...
2010-06-21
4,140 reads
Someone posted a note recently asking about how to detect the changes in a sequence. Say you have a table...
2010-06-21
4,140 reads
On Tuesday June 22nd 9 PM Eastern I”m presenting ETL with PowerShell for PASS AppDev VC—a virtual chapter of Professional...
2010-06-20
1,028 reads
I often begrudge a 5am start to travel anywhere, let alone to SQL events but this was a trip definitely...
2010-06-19
526 reads
I took a day off work so I could be here when Namaste Solar and IREA came out to my...
2010-06-18
871 reads
How Do I ... Get a List of Tables With Data Modifications in a Specific Timeframe?
There was a question on a...
2010-06-18
1,962 reads
This is just a short post that uses a contrived example to demonstrate how to find duplicate records in a...
2010-06-18
1,125 reads
Last month, the Professional Association for SQL Server (PASS) held its second 24 Hours of PASS, or 24 HOP for...
2010-06-18
412 reads
The minutes of the June 2010 Board meeting have been posted and if you haven’t read them yet, you missed...
2010-06-18
672 reads
I saw a Blog post by Grant Fritchey (Blog | Twitter) a couple days ago on using Geospatial data in SSRS...
2010-06-18
1,812 reads
This is a bit later than usual as the meeting was a week ago now, but I wanted to post...
2010-06-18
669 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