
已解决:
update ecs_goods set keywords= (select concat((select attr_value from ecs_goods_attr where ecs_goods.goods_id=ecs_goods_attr.goods_id and attr_id='182'),(select if((select attr_value from ecs_goods_attr where ecs_goods.goods_id=ecs_goods_attr.goods_id and attr_id='183') is NULL,'',concat(' ',(select attr_value from ecs_goods_attr where ecs_goods.goods_id=ecs_goods_attr.goods_id and attr_id='183'))) from dual),(select if((select attr_value from ecs_goods_attr where ecs_goods.goods_id=ecs_goods_attr.goods_id and attr_id='176') is NULL,'',concat(' ',(select attr_value from ecs_goods_attr where ecs_goods.goods_id=ecs_goods_attr.goods_id and attr_id='176'))) from dual),(select if((select attr_value from ecs_goods_attr where ecs_goods.goods_id=ecs_goods_attr.goods_id and attr_id='175') is NULL,'',concat(' ',(select attr_value from ecs_goods_attr where ecs_goods.goods_id=ecs_goods_attr.goods_id and attr_id='175'))) from dual)) from dual) where goods_type='10'