首页 > 代码库 > UNPIVOT

UNPIVOT

UNPIVOT 应用

  Week 表值:

  

  执行 UNPIVOT:

SELECT    Date,    ValueFROM (    SELECT        *    FROM Week) AS SourceUNPIVOT(    Value FOR Date    IN (Mon, Tue, Wed)) AS UNPVT

  结果:

  

 

UNPIVOT