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

Automating Flyway Undos

How to auto-generate first-cut undo scripts for every Flyway migration. For every new version of a database created by a Flyway versioned migration, we compare it to a 'source' directory containing object-level build scripts for the previous version. The SQL Compare engine does the rest, producing the associated undo script that will revert the database to the previous version, if required.

SQLServerCentral Editorial

Where the World Takes You

We're launching into a new year and there are lots of "looking into the future" articles out there. Personally, I'm pretty jazzed for the coming year for any number of reasons (can you say "SQL Server 2022"?). However, I also get a little retrospective at times like this. Now, I'm not going to talk about […]

Blogs

Using Copilot to help me update SQL Saturday

By

An interesting AI experiment here with Copilot from GitHub in handling some code I...

Master SQL with This Free Course (141 Interactive Exercises Included)

By

SQL is essential for modern businesses and applications that rely on data. It's a...

Read the latest Blogs

Forums

test new topic

By philip.scott

posting a new topic

New article

By Steve Jones - SSC Editor

Comments posted to this topic are about the item New article

Monitoring Azure Blob Storage

By arindamxs

Comments posted to this topic are about the item Monitoring Azure Blob Storage

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers