Methods to Rank Rows in SQL Server: ROW_NUMBER(), RANK(), DENSE_RANK() and NTILE()
SQL Server provides us with a number of window functions that help us to perform calculations...
Introducing Common Table Expressions in SQL Server
Common Table Expressions, or CTE for short, is simply a technique to create a temporary set of records that can be referenced within an...
Dynamic T-SQL and Benefits of its Usage
In our projects, we have to cope with different tasks. To solve some of them, we use dynamic T-SQL. Why do we need dynamic T-SQL? Well, it...
USE HINT and DISABLE_OPTIMIZED_NESTED_LOOP
One of the available algorithms to join two tables together in SQL Server is Nested Loops. The...
New Query Hints Including USE HINT in SQL Server 2016 SP
This article is an introduction to the query hint overview that appeared in SQL Server 2016 SP1. There are many different thoughts on using...
How to Pass Parameters in Dynamic T-SQL Query
Developers are often faced with the need to build a dynamic query, however, there are a number of pitfalls, which we will discuss further...