相关疑难解决方法(0)

SQL Server中的XML查询

我刚开始在SQL Server数据库中查询XML.我遇到了最基本的查询问题.这是一个简化的例子.我如何返回描述?下面的SELECT语句是我正在使用的,但它什么都不返回.

SELECT Incidents.IncidentXML.query
('data(/dsIncident/IncidentInformation/Description)') AS Description 
FROM Incidents
Run Code Online (Sandbox Code Playgroud)

这是我正在使用的XML文件的片段:

<dsIncident xmlns="http://tempuri.org/dsIncident.xsd">
  <IncidentInformation>
    <Description>This is the description.</Description>
    <Country>Singapore</Country>
  </IncidentInformation>
</dsIncident>
Run Code Online (Sandbox Code Playgroud)

xml sql sql-server xquery

5
推荐指数
1
解决办法
4505
查看次数

标签 统计

sql ×1

sql-server ×1

xml ×1

xquery ×1