Function to display integer as binary string
This function converts an integer to its binary representation. e.g. 15 is converted to '00001111'
2015-04-29 (first published: 2014-02-24)
827 reads
This function converts an integer to its binary representation. e.g. 15 is converted to '00001111'
2015-04-29 (first published: 2014-02-24)
827 reads
This function counts the number of 1's in the binary representation of an integer.
2015-04-28 (first published: 2014-02-24)
992 reads
Extract default & Named Instance from @@servername.
Print all characters before and after \ to find default and named instance name.
2015-04-27 (first published: 2015-04-15)
1,168 reads
2015-04-24 (first published: 2015-04-15)
1,215 reads
Check Status of a database. It will loop through all databases and will print message if the db is present.
2015-04-21 (first published: 2015-04-10)
1,335 reads
READ Data from default Trace to know when the objects are altered. If no database name is provided, it will run through all the databases.
2015-04-17 (first published: 2015-04-08)
1,433 reads
This script helps to identify which database/log takes most of the disk space and how much is free.
2015-04-15 (first published: 2013-06-18)
3,017 reads
Sometimes running DBCC CHECKDB WITH DATA_PURITY returns thousands of affected columns. This script automates the identification of those columns.
2015-04-13 (first published: 2013-07-04)
2,445 reads
Find any code objects that interact with a given table/view, or call another given code object.
2015-04-10 (first published: 2013-07-05)
4,646 reads
A stored procedure that will parse (shred) the contents of any well-formed XML document into a SQL table.
2015-04-08 (first published: 2013-07-09)
5,239 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