Home > Database > Mysql Tutorial > sqlserver插入xml节点的问题

sqlserver插入xml节点的问题

WBOY
Release: 2016-06-07 15:39:55
Original
1371 people have browsed it

问题描述:sql2008环境下,有一个users表,其中userinfo字段是XML类型,值是 rootxmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/users" user userid1/userid userNametest1/userName /user /root 现在要在 user 节点下插入另一节

问题描述:sql2008环境下,有一个users表,其中userinfo字段是XML类型,值是


    
        1
        test1
    

   

 

现在要在节点下插入另一节点:

shanghai

运行语句
    UPDATE Users SET UserInfo.modify('insert 
shanghai
 
     into (/root/user)[1]
')  

提示成功了,但是运行 SELECT  * FROM Users 查看的时候,节点并没有插入成功,不知道为什么呢????截图如下

 

sqlserver插入xml节点的问题

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template