Understanding Triggers
A trigger is a specialized stored procedure that activates (executes) in response to an event. There are two basic trigger...
2013-12-14
701 reads
A trigger is a specialized stored procedure that activates (executes) in response to an event. There are two basic trigger...
2013-12-14
701 reads
SQL Server Integration Services (SSIS) security is based around several layers that provide a rich and flexible security environment. These...
2013-12-14
723 reads
In the first of this three-part series, you will learned how to use scripts and batches, and basics of T-SQL...
2013-10-22
1,221 reads
SQL Server users use Transact-SQL programming to create sets of statements for ad-hoc execution. The aim of the Transact-SQL programming...
2013-10-22
1,139 reads
2013-09-20
624 reads
Microsoft ships SQL Server with several built-in tools that database administrators (DBAs) can use to manage their SQL Server environment....
2013-09-17
819 reads
Most of the activity of the database server is related to queries. Because of this, query optimization is often a...
2013-09-17
994 reads
Checkout the part-4 of my five part article series on Guide to SQL Server Table Indexeshere, in which you will learn...
2013-09-17
523 reads
A database server is generally a mission critical component. Having a recovery plan is essential to ensure the business can...
2013-09-17
431 reads
Managing changes to environment dependent variables is common and critical in any ETL application, especially during deployment of SSIS packages....
2013-09-17
769 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