个人整理,并非适用于所有人。特别注意:操作前注意备份好数据库。
(1)ECSHOP更新商品静态url:
UPDATE `ec272u2`.`ecs_goods` SET `goods_url` = ‘4545444’ WHERE `ecs_goods`.`goods_id` =3509 LIMIT 1 ;
(2)ECSHOP更新商品seo标题:
ALTER TABLE `ecs_category` ADD `cat_seoname` VARCHAR( 255 ) NOT NULL AFTER `cat_seoname`
(3)ECSHOP更新商品clicks_count到小于800的点击:
UPDATE [Case] SET click_count = click_count + CAST(CEILING(RAND(checksum(NEWID())) * 800) AS int) WHERE (Hits < 100) ;
UPDATE ecs_goods SET click_count = click_count + 100 WHERE (click_count < 100);
(4) ECSHOP更新商品salesvolume AND (/**FLOOR(x)返回小于x的最大整数值 RAND() 返回在范围0到1.0内的随机浮点值2。
ALTER TABLE `ecs_goods` ADD `goods_salesvolume` inNULLods_weight` ;
UPDATE ecs_goods set goods_salesvolume= FLOOR(1 +(RAND() * 2345));
(5) ECSHOP批量更新替换货号
UPDATE `ecs_goods` SET `goods_sn` = CONCAT(‘it’,goods_id,’-‘, seller_note) where ;
(6) ECSHOP更新订单初始基数,批量上下架
alter table ecs_order_info AUTO_INCREMENT=10000;
UPDATE `ecs_goods` SET is_on_sale = 1 where goods_id > ;
(7)ECSHOP批量更新替换商品名称
UPDATE `ecs_goods` SET goods_name = replace (goods_name,’Kate Co’,”) WHERE `goods_name` LIKE ‘%Kate&Co%’; 分大小写
请注意:操作会直接影响数据库,以防万一,请操作前注意备份。