The problem is: how to get one million numbers to table with less time? We can solve this problem using different approaches but not all of them are quick. Let’s go now step by step and see how different approaches perform.
First idea for many guys is using WHILE. It is robust and primitive approach … Read More →
SUMMARY : In this mini-tutorial, you will learn how to query data from multiple tables using T-SQL JOINS statement.
A SQL JOIN combines records from two tables.A JOIN locates related column values in the two tables.A query can contain zero, one, or multiple JOIN operations.INNER JOIN is the same as JOIN; the keyword INNER … Read More →
Gaps and islands problems involve missing values in a sequence. Solving the gaps problem requires finding the ranges of missing values, whereas solving the islands problem involves finding the ranges of existing values. The sequences of values in gaps and islands problems can be numeric, such as a sequence of order IDs, some of which … Read More →
The Query’s goal is :
Find the top 5 Locations
List the users who live in those top 5 Locations, alphabetized by their DisplayName
There are a LOT of ways I could write this query, but for the purpose of this post, I’m only going to contrast common table expressions (CTEs) versus temp tables:
We’re talking about a relatively … Read More →
In this article (Italian), we have already discussed Continuous Integration and DLM. We described the main reasons for putting a database under source control and for testing our databases. In this article, we are going to discuss a real scenario of SQL Server unit testing with the tSQLt framework.
What Is Unit Testing
In computer programming, unit … Read More →