Azure Data Studio Schema Compare Extension
A coworker recently introduced me to the SQL Server Schema Compare extension in Azure Data Studio. It has come in handy since we don’t have any paid-for tools, so...
2023-07-13
99 reads
A coworker recently introduced me to the SQL Server Schema Compare extension in Azure Data Studio. It has come in handy since we don’t have any paid-for tools, so...
2023-07-13
99 reads
Earlier this week the emails went out to speakers who submitted to the PASS Data Community Summit 2023 conference. These were acceptances and rejections, letting people know the results...
2023-07-28 (first published: 2023-07-13)
161 reads
I was having a conversation with some friends the other day and Jen McCown (blog|twitter) asked about SQL Server security ... Continue reading
2023-07-28 (first published: 2023-07-13)
327 reads
A high level view of the most costly queries by CPU
I want to see at a high level i.e at batch or stored procedure level, not at the individual...
2023-07-31 (first published: 2023-07-13)
1,642 reads
I had to test something for a customer, and as a part of this there as a need to have a different default schema for a user. Since this...
2023-07-31 (first published: 2023-07-12)
288 reads
I had a requirement to temporarily prevent access, read or write, to a particular database for all users except 2 users. There were hundreds of SQL Logins with access...
2023-07-12 (first published: 2023-07-11)
159 reads
The invitation this month is from Erik Darling, and it’s a neat one. I like this thought, asking us to find code that impressed us or made us feel...
2023-07-26 (first published: 2023-07-11)
454 reads
It’s been a while, but I’m finally participating in T-SQL Tuesday again! This month Erik Darling (blog|twitter) is hosting. Ever ... Continue reading
2023-07-26 (first published: 2023-07-11)
377 reads
What will be much easier with Microsoft Fabric?
Microsoft Fabric is built on a foundation of Software as a Service (SaaS), which takes simplicity and integration to a whole new...
2023-07-24 (first published: 2023-07-11)
408 reads
A Barebone Script To Generate SQL Script to Create Synonyms
This stored procedure can be used to generate a SQL script to create synonyms for all tables in...
2023-07-12 (first published: 2023-07-10)
129 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