SQL Server – Find all the LOB Data Type Columns in a Database Using T-SQL Script
Today morning when I was working on a huge database containing lots of LOB data, I was required to know...
2013-09-12
882 reads
Today morning when I was working on a huge database containing lots of LOB data, I was required to know...
2013-09-12
882 reads
Even though there are more pros than cons, Striping database backups are often overlooked by many DBAs. Based on my...
2013-09-03
1,671 reads
Ever noticed and wondered why the well-known SQL Server system administrator (sa) login is in a disabled state? The reason...
2013-08-20
747 reads
Most of the DBAs at some point of time in their career should have faced at-least one of the below...
2013-08-10
1,399 reads
Cleaning/deleting the old backup files is equally important as taking the backups. Doing so we can (i) Avoid overhead cost for...
2013-08-07
1,005 reads
Earlier today I was required to pull the list of all SQL Login Accounts, Windows Login Accounts and Windows Group Login...
2013-08-06
1,419 reads
One of the first things I did when I began my journey with SQL Server was installing a sample database....
2013-07-31
1,606 reads
From a recent conversation with a customer, I noticed even some of the experienced DBAs are not very clear about...
2013-06-28
1,625 reads
By default, SQL Server automatically assigns a value to the Identity Column for each new row inserted into the table....
2013-06-02
674 reads
In SQL Serve 2012, we can get the default data file and log file locations using a simple T-SQL query...
2013-05-23
668 reads
By James Serra
Making Data AI-Ready, Part 3 (This is the final article in a three-part series...
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...
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