SQL Server枢轴是否为空?

SQL Server枢轴是否为空?,第1张

SQL Server枢轴是否为空?

使用:

SELECt pvt.Name    , isnull(pvt.[vocals], '') [vocals]    , isnull(pvt.[guitar], '') [guitar]    , isnull(pvt.[bass], '') [bass]    , isnull(pvt.[drums], '') [drums]FROM PivotSource  PIVOT(    max(tool)     FOR tool     IN ([vocals], [guitar], [bass], [drums]) ) pvt;

输出

Name       vocals     guitar     bass       drums---------- ---------- ---------- ---------- ----------george     vocals     john       vocals     guitar     paul       vocals     bass       ringo      vocals     drumsroyi       vocals     guitar     yoko       vocals


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/4915390.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-12
下一篇 2022-11-12

发表评论

登录后才能评论

评论列表(0条)

保存