扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:朱先忠编译 来源:天极开发 2007年10月22日
关键字: SQL Server
在本页阅读全文(共5页)
modify(<XMLDML>) |
SET @doc.modify(' insert <Pitcher name="Jaret Wright"/> as last into (/Team/Players)[1] ') |
UPDATE Team SET TeamDoc.modify(' insert <Pitcher name="Jaret Wright"/> as last into (/Team/Players)[1] ') WHERE TeamDoc.exist('/Team[@name="Braves"]') = 1 |
insert InsertExpression ( {{as first | as last} into | after | before} LocationExpression ) |
SET @doc.modify(' insert <Pitcher role="Starter" name="Jaret Wright"/> before (/Team/Players/Pitcher)[1] ') |
SET @doc.modify(' insert <Pitcher role="Starter" name="Jaret Wright"/> into (/Team/Players)[1] ') |
SET @doc.modify(' insert <Pitcher role="Starter" name="Jaret Wright"/> as last into (/Team/Players)[1] ') |
delete LocationExpression |
SET @doc.modify('delete/Team/Player/Pitcher') |
SET @doc.modify(' delete /Team/Players/Pitcher[@name="John Smoltz"] ') |
SET @doc.modify(' delete /Team/Players/Pitcher[ @name="John Smoltz"]/@role') |
replace value of OriginalExpression with ReplacementValue | if |
DECLARE @doc xml SELECT @doc = ' <Team name="Braves"> <Players> <Pitcher name="John Smoltz" role="Closer"> With team since 1989 </Pitcher> </Players> </Team>' SET @doc.modify(' replace value of (/Team/Players/Pitcher[ @name="John Smoltz"]/text())[1] with "May start in 2005" ') |
SET @doc.modify(' replace value of (/Team/Players/Pitcher[ @name="John Smoltz"]/@role)[1] with "Starter" ') |
SET @doc.modify(' replace value of (/Team/Players/Pitcher[ @name="John Smoltz"]/@role)[1] with ( if (/Team/Players/Pitcher[ @name="John Smoltz"]/@role = "Closer") then "Starter" else "Closer" ) ') |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者