sql 之 update join 语句

跨表修改相应的字段

    UPDATE wms_product_categories AS c
    LEFT JOIN wms_products AS p ON p.p_category_id = c.pc_id
    SET c.pc_level = 5,
     p.p_sku_main = 1

你可能感兴趣的:(sql 之 update join 语句)