sql server 多列转多行实现方法
select * from b_workOrder
select * from( SELECT work_order_id,work_level, roles,code
FROM
(SELECT work_order_id,work_level,operator_code,sqc_code,hqc_code
FROM b_workOrder where sqc_code <>'') p
UNPIVOT
(code FOR roles IN (operator_code,sqc_code,hqc_code))
AS unpvt) as a