Stairway to Advanced T-SQL

Stairway to Advanced T-SQL Level 5: Turning Data On Its Side Using PIVOT Operator

The PIVOT operator was added to the Transact-SQL language in SQL Server 2005. It allows you to turn your row data on its side, so it can be presented as column data. This is useful when you want take unique column values and have them displayed as column headings, where the column headings are associated with summarized values displayed below each column heading. In this article I will be exploring how to use the PIVOT operator.

External Article

Pagination and ordering by large values

Pagination is a technique for limiting output. Think of Google search results, shopping the electronics category on Amazon, or browsing tagged questions on Stack Overflow. Nobody could consume all of the results in a single shot, and no site wants to spend the resources required to present them all to us

Blogs

How Redgate Flyway Can Boost Your DevOps Journey

By

A brief introduction to the tool and its advantages for database migrations DevOps is...

Building a Docker image with Docker Build Cloud

By

In a previous blog post we went through how to build a Docker container...

Top 8 Courses to Learn SQL for Data Science in 2024 & Beyond

By

Businesses are drowning in data, but starving for insights. That's where SQL experts swoop...

Read the latest Blogs

Forums

The Marked Transaction

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Marked Transaction

What happens when we drop a column on a SQL Server table? Where's my space?

By Cláudio Silva

Comments posted to this topic are about the item What happens when we drop...

Sort comma delimited string in column

By DBrown

I have a column that contains comma separated values.  I'm trying to figure out...

Visit the forum

Question of the Day

The Marked Transaction

I want to mark a transaction in the log as a recovery point. How do I do this in my code if I use the transaction, myTran?

See possible answers