Getting TEXT, NTEXT and IMAGE columns in Database
As per Microsoft documentation these types will be removed from future version
2017-06-02 (first published: 2017-05-31)
2,943 reads
As per Microsoft documentation these types will be removed from future version
2017-06-02 (first published: 2017-05-31)
2,943 reads
Script describe one of the way to divide values into rows by using any specified dividing value.
2016-11-15 (first published: 2016-11-04)
854 reads
Using OVER clause with ROW_NUMBER() function to get top ranked employee detail as per each department.
2016-10-25 (first published: 2016-10-03)
829 reads
SQLCMD is one of many methods to export your database data to some text file
2016-10-12 (first published: 2016-09-27)
22,202 reads
Checks currently running sessions and blocking queries with session information
2016-10-05 (first published: 2016-09-16)
818 reads
2016-07-05 (first published: 2016-05-26)
4,941 reads
2016-07-01 (first published: 2016-05-24)
680 reads
LEAD and LAG functions are new in SQL Server 2012 , This short Script could be used to get these values in Earlier versions also
2016-06-28 (first published: 2016-05-18)
805 reads
Procedure to compare two tables , getting table names and rows to display
2016-06-07 (first published: 2016-05-06)
1,067 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