sql 行转列超快方法
SELECT model_name,
MAX(case when attr_key='name' then attr_value END) as name,
max(case when attr_key='Description' then attr_value END) as Description,
max(case when attr_key='Temperature' then attr_value END) asTemperature,
max(case when attr_key='Pressure' then attr_value END) as Pressure,
max(case when attr_key='Pressure' then attr_value END) as Pressure,
max(case when attr_key='Shop' then attr_value END) as Shop
FROM P_MODEL_DESIGN_ATTR
group by model_name