www.mjjq.net > mysql unpivot

mysql unpivot

eate table tb( Name varchar(10), Course varchar(10), Score int ) go insert into tb values('张三','语文',74) insert into tb values('张三','数学',83) insert into tb values('张三','物理',93) insert into tb values('李四','语文',74)...

SELECT 'CountSELF' , 'CountTB' FROM tbname UNPIVOT (SELF FOR TB IN ([orderCountSELF],[orderCountTB])) t

(select colname,colvalue from B unpivot(colvalue for colname in ("CA",...mysql="select "tt = 0do whileget nameif tt = 0 thenmysql = mysql +...

网站地图

All rights reserved Powered by www.mjjq.net

copyright ©right 2010-2021。
www.mjjq.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com