number of rows and columns of an instance
Get the number of rows, columns, and space used by all tables in all databases
2018-10-03 (first published: 2018-09-20)
521 reads
Get the number of rows, columns, and space used by all tables in all databases
2018-10-03 (first published: 2018-09-20)
521 reads
Script to stop the default Data Collection sets, clear the cache files and then restart collection sets.
2018-10-02 (first published: 2018-09-25)
1,467 reads
Order records based on a different column depending on which absolute value is greater.
2018-10-01 (first published: 2018-09-26)
658 reads
2018-09-26
496 reads
A copy of the late Robert Davis' dba_copylogins stored procedure with a bug fix. The SP copies logins, roles, and permissions between servers.
2018-09-24 (first published: 2018-08-28)
1,803 reads
2018-09-21 (first published: 2018-06-01)
2,126 reads
2018-09-20 (first published: 2018-08-28)
913 reads
Didn't find anything, so hope this will help someone with similar need.
Note I did a similar set-based version, and unless the input is more towards non-zeros in all eight 2-byte fields, the set-based performs not as well
2018-09-19 (first published: 2018-09-12)
609 reads
2018-09-04 (first published: 2018-08-23)
334 reads
This scripts helps to generate ADD / DROP Constraints against single Database.
2018-09-03 (first published: 2018-08-14)
265 reads
By Steve Jones
I use ConEmu for my terminal interface. I’m still on Windows 10 at home,...
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...
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