Window Function Basics - PARTITION BY
This article looks at the basics of the OVER() clause and how the PARTITION section works.
2023-12-08
9,725 reads
This article looks at the basics of the OVER() clause and how the PARTITION section works.
2023-12-08
9,725 reads
This is a short look at a technique that I discovered recently in Management Studio (SSMS). The technique is to compare two graphical execution plans in the tool to understand what they are doing and how two different queries might affect a particular system, both with the image and with the properties' data behind the […]
2023-11-24 (first published: 2021-03-30)
10,497 reads
This article shows how you can randomize dates in T-SQL, but keep the month and year the same while the day varies.
2022-06-24
1,746 reads
One of the lesser used functions is COALESCE(), used to allow you to return one value from a list of those that are potentially NULL. This short pieces gives a few examples where this is useful?
2021-08-16
4,311 reads
With the addition of Python to Machine Learning Services in SQL Server 2017, you can now execute your Python code inside of SQL Server.
2020-11-13 (first published: 2019-04-18)
37,388 reads
Learn how you can create a database in the serverless tier in Azure.
2020-06-29
9,744 reads
Recently I went to work on a SQL Server 2017 instance and couldn't get the Python runtime to load. I'd keep getting this error: A strange error for me to see, and one that didn't quite make sense. How can the runtime not launch? However, restarting the instance still resulted in this error: Msg 39021, […]
2019-10-24
8,373 reads
Transparent Data Encryption (TDE) has been around for a long time. It first appeared in SQL Server 2008, and after a rocky start with some bugs, it has become a regularly used feature for many organizations. While not perfect, it does provide some protection and auditors like to see physical protection features being used. It's […]
2019-08-29
15,309 reads
One feature that I have been waiting for years! The new announcement around optimize...
Following on from my last post about Getting Started With KubeVirt & SQL Server,...
By DesertDBA
I haven’t posted in a while (well, not here at least since I’ve been...
Comments posted to this topic are about the item Refactoring SQL Code, which is...
Comments posted to this topic are about the item The Read Committed Snapshot Isolation...
Comments posted to this topic are about the item Working with JSON/JSONB Data in...
I am currently working with Sql Server 2022 and AdventureWorks database. First of all, let's set the "Read Committed Snapshot" to ON:
use master; go alter database AdventureWorks set read_committed_snapshot on with no_wait; goThen, from Session 1, I execute the following code:
--Session 1 use AdventureWorks; go create table ##t1 (id int, f1 varchar(10)); go insert into ##t1 values (1, 'A');From another session, called Session 2, I open a transaction and execute the following update:
--Session 2 use AdventureWorks; go begin tran; update ##t1 set f1 = 'B' where id = 1;Now, going back to Session 1, what happens if I execute this statement?
--Session 1 select f1 from ##t1 where id = 1;See possible answers