Skip to content
Home ยป sql unpivot query

sql unpivot query

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,570 total views,  2 views today