Unleash the Power of SQL Pivot and Unpivot: A Complete Guide to Data Transposing Techniques
Data manipulation is an essential skill for anyone working with SQL databases. It allows you to...
Calculating Running Total with OVER Clause and PARTITION BY Clause in SQL Server
You often come across scenarios where you have to calculate a running total of a quantity. A running total refers to the sum of values in...
Grouping Data using the OVER and PARTITION BY Functions
The OVER and PARTITION BY functions are both functions used to portion a results set according to specified criteria. This article explains...
Dynamic SQL vs Stored Procedure
Dynamic SQL and stored procedures are among the most important SQL Server components. Both have...
Creating Dynamic Pivot Table with QUOTENAME Function
In my previous article on the basic pivot operator, we saw how pivot operator could be used to convert rows to columns, resulting in pivot...
Understanding Pivot Operator in SQL
The pivot operator in SQL Server converts each row in the aggregated result set into corresponding columns in the output set. The pivot...
Understanding Transactions in SQL
A transaction in SQL is a unit of execution that groups one or more tasks together. A transaction...
The Lost Update Problem in Concurrent Transactions
The lost update problem occurs when 2 concurrent transactions try to read and update the same data. Let’s understand this with the help...
Understanding Dirty Read Problem with SQL Server
One of the most common problems that occur while running concurrent transactions is the Dirty Read problem. A dirty read occurs when one...
Introducing Common Table Expressions in SQL Server
Common Table Expressions, or CTE for short, is simply a technique to create a temporary set of...