2012-11-30 (first published: 2012-11-03)
1,104 reads
2012-11-30 (first published: 2012-11-03)
1,104 reads
This function return the text format of a month calendar. It could be useful for sending through emails when you do do not have other tools, but T-SQL to send text emails.
2012-11-29 (first published: 2012-10-31)
1,966 reads
Stored proc for scripting out full CREATE INDEX statements from your table indexes with all filegroup, filter and WITH parameters.
2012-11-27 (first published: 2012-10-18)
2,558 reads
This script will provide a dynamic mechanism to decide between REBUILDING an index or simply REORGANIZING an index. Tested and approved for SQL Server 2005 & 2008 Standard or Enterprise or R2.
2012-11-26 (first published: 2012-10-18)
3,934 reads
This script will tell you how many indexes there are for a single table and also it specifically shows how many non clustered index, and also which tables have a heap index.
2012-11-23 (first published: 2012-10-17)
1,330 reads
This script will produce the top 10 wait state issues along with their descriptions.
2012-11-22 (first published: 2012-10-22)
1,780 reads
2012-11-21 (first published: 2012-10-02)
1,596 reads
2012-11-16 (first published: 2012-10-02)
1,224 reads
Constructs a restore script for all databases on the server from backup history.
2012-11-12 (first published: 2012-09-26)
1,240 reads
Find all columns containing a string value across all tables and schemas.
2012-11-07 (first published: 2012-10-12)
2,111 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