会员登录 | 注册

来去留技术信息资源

来去留技术信息资源
来去留网 > 来学技术 > dedecms织梦SQL命令行工具常用操作代码(2)

dedecms织梦SQL命令行工具常用操作代码(2)

2020-03-20 14:29来源:未知发布者:laiquliu 查看:
 
织梦sql命令批量删除某个id段的文章:
 
delete from dede_addonarticle where aid >= 100 and aid< =5000;
 
delete from dede_arctiny where id >= 100 and id< =5000;
 
delete from dede_archives where id >= 100 and id<=5000;
 
这段sql命令就是把文章id从100到5000的全部删除掉
 
织梦sql命令批量删除某个栏目下文章:
 
delete from dede_addonimages where typeid = 7;
 
delete from dede_arctiny where typeid = 7;
 
delete from dede_archives where typeid = 7;
 
织梦sql命令批量删除指定栏目:
 
delete from dede_arctype where id in (93,94,95,96,97)
 
注:这段sql命令就是把栏目id为93、94、95、96、97的栏目删除掉了
 
织梦sql命令批量合并文章到指定栏目:
 
update dede_archives set typeid='70' where typeid in (93,94,95,96,97)
 
注:这段sql命令就是把栏目栏目id为93,94,95,96,97里面的文章归为栏目id为70的栏目下面
 
织梦sql命令批量合并栏目到指定栏目为子栏目:
 
Update `dede_arctype` set reid='目标父栏目ID' where id in(2,3,4,5)
 
织梦sql命令批量清空文章:
 
delete from dede_addonarticle;
 
delete from dede_addonimages;
 
delete from dede_archives;
 
delete from dede_arctiny;
 
delete from dede_co_htmls;
 
delete from dede_co_urls;
 
delete from dede_co_mediaurls;
 
delete from dede_tagindex ;
 
delete from dede_taglist;
 
delete from dede_keywords;
 
注:这段sql命令意思是清空文章和原来采集过的记录
 
织梦新发布文章id从1开始:
 
alter table `dede_archives` auto_increment =1;
 
alter table `dede_arctiny` auto_increment =1;
 
alter table `dede_addonarticle` auto_increment =1;
 
织梦新发布栏目id从1开始:
 
alter table `dede_arctype` auto_increment =1;
 
注:表示新发布的文章或者栏目id从1开始,数字1也可以改为指定从任意id开始
(责任编辑:laiquliu)

关注技术,信息,资源,扫描来去留网微信二维码交流。

来去留我李俊

搜索

------分隔线----------------------------
相关栏目

热点推荐
来去留技术信息资源
来去留网为您提供平台咨询交流学习方法及各类热门技术;电器,服装,保健,行业快讯等二十几个类别的资讯