PIVOT and UNPIVOT - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ NewSQL Engine Release Summary

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
hqm1512077988481.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
B035-1098
lifecycle
previous
Product Category
Software
Teradata Vantage

The PIVOT and UNPIVOT operators provide simple syntax to transform rows into columns, and columns into rows, providing users with flexibility and ease of use. Using PIVOT and UNPIVOT makes it easier to port applications to Teradata Database.

Benefits

  • The PIVOT operator easily transforms rows into columns. The function is also useful for reporting purposes. It allows users to aggregate and rotate data and create meaningful, easy-to-read tables.
  • The UNPIVOT operator works the opposite of PIVOT, transforming columns into rows, and can transform non-normalized data into a normalized result set.

SQL Changes

The SELECT statement is extended to support PIVOT and UNPIVOT operators in the FROM clause.

Additional Information

For more information see Aggregation of Pivoted Columns and Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates, B035-1145.