-- 商品添加参与vip优惠标识 0否 1是 alter table goods add vip_promotion varchar(1) not null default 0 comment '是否参与vip优惠 0否 1是' after shop_id; -- 更新商品是否参与vip优惠 update goods set vip_promotion = 1 where shop_id in (select shop_id from goods_shop where vip_promotion = '1')