5,889
社区成员
发帖
与我相关
我的任务
分享
select a.productId,a.productName,b.attrvalue as size,c.attrvalue as color,d.attrvalue as width
from product a
left join (select * from prodeuctattribute where attrname = 'size' ) b on a.productid = b.productid
left join (select * from prodeuctattribute where attrname = 'color' ) c on a.productid = c.productid
left join (select * from prodeuctattribute where attrname = 'width' ) d on a.productid = d.productid