简体   繁体   English

SQL Server 2005批量XML删除?

[英]Sql Server 2005 Bulk XML Delete?

I know you can do bulk XML inserts into SQL Server 2005 tables from your C# code using datasets/datatables. 我知道您可以使用数据集/数据表从C#代码中将大量XML插入SQL Server 2005表中。 Is it possible to do the same but as a delete? 除删除外,是否可以做同样的事情?

You can remove data two ways 您可以通过两种方式删除数据

DELETE FROM Schema.TableName WHERE Condition = Value

OR nuke it 或核对它

TRUNCATE TABLE Schema.TableName

Now, if you want to Bulk Delete rows based on an XML file, you are going to have to import the data into a staging table or open it as a rowset and then do a JOIN or EXISTS to delete. 现在,如果要基于XML文件批量删除行,则必须将数据导入到临时表中或将其作为行集打开,然后执行JOINEXISTS删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM