Skip to content
Home ยป sql server unpivot data

sql server unpivot data

SQL Server UNPIVOT

SQL Server UNPIVOT allow us to transform columns of a table-valued expression into column values that is rotating columns into rows.

It performs a reverse operation of SQL Server PIVOT.

SYNTAX
SELECT …
FROM …
UNPIVOT (
FOR IN ( ) )

[ … ]

 7,666 total views,  7 views today