UNPIVOT

Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

Purpose

UNPIVOT is the reverse of the PIVOT operation. It provides a mechanism for transforming columns into rows.

The UNPIVOT functionality was introduced previously via the TD_UNPIVOT table operator. This feature introduces grammar to support the UNPIVOT operator in the FROM clause of the SELECT statement.

UNPIVOT invokes the TD_UNPIVOT table operator internally. You can still use TD_UNPIVOT independent of UNPIVOT.

Syntax