我刚开始在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)