时间:2021-07-01 10:21:17 帮助过:12人阅读
行转列后:
SELECT P.ProgrectName,P.Supplier,P.SupplyNum FROM ( SELECT ProgrectName, OverseaSupply, NativeSupply, SouthSupply, NorthSupply FROM ProgrectDetail )T UNPIVOT ( SupplyNum FOR Supplier IN (OverseaSupply, NativeSupply, SouthSupply, NorthSupply ) ) P
sql面试题:行转列
标签:out create color pre unp insert unpivot south 国内