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.

Blogs

6 Best SQL Training Courses for Beginners (2024 Updated)

By

We all know that choosing the right basic SQL training is absolutely crucial if...

SQL Saturday Atlanta 2024

By

Hey there happy coders! Last weekend I had the pleasure of speaking at the...

Test Data Management – 2024 is your year to do it

By

This blog post is about Test Data Management – or my take on it....

Read the latest Blogs

Forums

Action Over Knowledge

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Action Over Knowledge

a function that acts like both a scalar and table valued function

By stan

Hi, i hope i'm doing this question justice.  A peer of mine likes the...

What does it mean when Query Store Tracked Queries shows the same Plan Id twice?

By StarNamer

I'm investigating a query which sometimes performs badly and, when I locate one of...

Visit the forum

Question of the Day

Post Restore Tasks for the Resource Database

I backup the Resource database from my SQL Server 2022 instance. I then install CUs 1, 2, 3, and 4. I have an issue and need to restore my Resource database from backup. Is there anything I need to do after restoring this database?

See possible answers