Home > DeveloperSection > Interviews > What is PIVOT and UNPIVOT in SQL?

Posted on    August-21-2014 12:09 AM

 MSSQL Server MSSQL Server 
Ratings:
 1 Answer(s)
  944  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Points:3910
Posted on    August-21-2014 12:00 AM

A Pivot Table can automatically sort, count, and total the data stored in one table or spreadsheet and create a second table displaying the summarized data. The PIVOT operator turns the values of a specified column into column names, effectively rotating a table.

UNPIVOT table is reverse of PIVOT Table.

Don't want to miss updates? Please click the below button!

Follow MindStick