2012-05-22 (first published: 2012-05-01)
838 reads
2012-05-22 (first published: 2012-05-01)
838 reads
Find a string in any "string" (char, varchar, nchar etc) column in the database.
2012-05-18 (first published: 2007-12-19)
5,769 reads
Calculates the nth due date for any given date, while accounting for weekends.
2012-05-16 (first published: 2007-10-11)
3,810 reads
This script maps the primary key - foreign key relations regardless if the column names are the same or not.
2012-05-15 (first published: 2007-11-07)
2,992 reads
A script to generate a recovery script for setting your sa account back to the password it is using at the time of running this script.
2012-05-14 (first published: 2012-04-09)
1,002 reads
Searches database for up to 4 keywords. It will search through SPs, UDFs, Triggers, SSIS packages, jobs, table names, and column names.
2012-05-10 (first published: 2012-04-18)
2,216 reads
2012-05-09 (first published: 2012-04-19)
1,372 reads
An interesting recursive CTE to list out the non-alphanumeric characters in a column of a table.
2012-05-08 (first published: 2012-04-12)
3,028 reads
2012-04-30 (first published: 2012-04-04)
688 reads
This topic explains the log shipping if the primary database is suspected or corrupted and how you can convert the secondary database into primary database.
2012-04-27 (first published: 2012-03-31)
1,019 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