//表 与 结果集 关联更新字段数据 update purchase_cart as a,(select pCode,stock from product_sku_test where stock>0 ) as b set a.pCount=b.stock where a.pCode = b.pCode;
//字段重复次数 select pCode, count(*) as count from product_sku group by pCode having count>1;