top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to use Pivot in SQL Server?

+1 vote
300 views
How to use Pivot in SQL Server?
posted Dec 26, 2013 by Atul Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

You can use the PIVOT and UNPIVOT relational operators to change a table-valued expression into another table. PIVOT rotates a table-valued expression by turning the unique values from one column in the expression into multiple columns in the output, and performs aggregations where they are required on any remaining column values that are wanted in the final output. UNPIVOT performs the opposite operation to PIVOT by rotating columns of a table-valued expression into column values.

answer Dec 26, 2013 by Vishvachi Tiwari
...