sql 与SQL的空的回收站

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 与SQL的空的回收站相关的知识,希望对你有一定的参考价值。

delete from cmsPreviewXml where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)
delete from cmsContentVersion where contentId in (select id from umbracoNode where path like '%-20%' and id!=-20)
delete from cmsDocument where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)
delete from cmsContentXML where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)
delete from cmsContent where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)
delete from cmsPropertyData where contentNodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)
delete from dbo.umbracoRelation where childId in (select id from umbracoNode where path like '%-20%' and id!=-20)
delete from dbo.umbracoRelation where parentId in (select id from umbracoNode where path like '%-20%' and id!=-20)
delete from dbo.umbracoDomains where domainRootStructureID in (select id from umbracoNode where path like '%-20%' and id!=-20)
-- delete the XML nodes....
delete from umbracoNode where path like '%-20%' and id!=-20

以上是关于sql 与SQL的空的回收站的主要内容,如果未能解决你的问题,请参考以下文章

怎样把一条SQL语句查询出的结果集中的空值替换成0

SQL语句case怎么判断这个字段为空

在 MySql 中,如何将 csv 文件中的 sql 字符串中的空值导出为双引号(“”)?

那些年我们踩过的坑,SQL 中的空值陷阱!

sql查询中有一列中有NULL的数据,如何判断不为空的时候才进行操作?

sql server 查询 order by 与 union 并替换多个列的空值