mysql 给已存在的商品数据,根据商品ID增加商品编号

有这个需求,所以记录一下

风来了.fox

update zh_product set product_no=CONCAT('P150907000000000',LPAD(product_id,2,'0'));


你可能感兴趣的:(数据库)