2016-05-17 (first published: 2014-08-25)
2,580 reads
2016-05-17 (first published: 2014-08-25)
2,580 reads
2016-05-16 (first published: 2012-10-17)
5,580 reads
Compare the structure/layout of two tables within an instance of SQL Server (version 2012) and return non-matches.
2016-05-13 (first published: 2014-04-23)
2,953 reads
Concatenate columns grouping on Index column (approach for summing varchar columns by grouping on index)
2016-05-12 (first published: 2009-09-13)
1,598 reads
Query that simulates running sp_spaceused on every applicable object in a database and gathering it all into a single result set.
2016-05-10 (first published: 2013-06-03)
2,299 reads
Yet another schedule description query with added grammatical improvements.
2016-05-06 (first published: 2016-04-20)
871 reads
I was recently asked to monitor the Database size on the SQL server, and display the results in a report.
2016-05-05 (first published: 2016-04-16)
820 reads
An enhanced version of a script originally posted by Robert Pearl some time ago. It now takes into account changes in the tabelresults for CHECKDB in latter versions of SQL Server.
2016-05-04 (first published: 2016-04-20)
1,300 reads
searches entire db for a string, number, or date, returns list of results
2016-05-02 (first published: 2016-04-20)
1,279 reads
As part of the application to monitor SQL health I created.
The procedure returns status of the SQL server Agent
2016-04-29 (first published: 2016-04-16)
640 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