What is PIVOT and UNPIVOT in SQL?
2306
21-Aug-2014
Updated on 15-Sep-2020
Sumit Kesarwani
21-Aug-2014A 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.