SCOPE_IDENTITY() or @@IDENTITY
I’ve seen quite a lot of usage of both functions in the T-SQL codes. However, their usage sometimes matters. The expectation from @@IDENTITY can sometimes not be the desired. This...
2017-01-27
10 reads
I’ve seen quite a lot of usage of both functions in the T-SQL codes. However, their usage sometimes matters. The expectation from @@IDENTITY can sometimes not be the desired. This...
2017-01-27
10 reads
I’ve seen quite a lot of usage of both functions in the T-SQL codes. However, their usage sometimes matters. The expectation from @@IDENTITY can sometimes not be the desired. This...
2017-01-27
13 reads
I’ve seen quite a lot of usage of both functions in the T-SQL codes. However, their usage sometimes matters. The expectation...
2017-01-27
283 reads
I am so happy to share the news that as of today, the new community CloudProPT (as in Cloud for...
2017-01-27
458 reads
I’ve been wandering through the dbatools set of cmdlets, trying to see where various cmdlets are useful, and also practicing...
2017-01-27
519 reads
Here is a list of the upcoming PASS Virtual Groups and SQLSautrday Events.
January, 2017
Tuesday,January,31
Introduction to Oracle SQL and PL...
2017-01-27
672 reads
I've seen a lot of usage of both functions in the T-SQL codes. However, their usage sometimes matters. The expectation from...
2017-02-01 (first published: 2017-01-27)
3,238 reads
Is it really still January? It seems like this month is dragging on a bit. Anyway, this week I’ve been...
2017-01-27
405 reads
Microsoft just announced Microsoft SQL Server 2016 Cumulative update 1 (CU1)
Microsoft reference: [Click Here]
Ganapathi varma ChekuriLead SQL DBA, MCPLinkedin
2017-01-27
318 reads
The encryption mechanisms in SQL Server are interesting, and they work well, but they are somewhat poorly named. I ran...
2017-02-03 (first published: 2017-01-26)
1,743 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