4
我刚刚开始在SQL Server数据库中查询XML。我遇到了最基本的查询问题。这是一个简单的例子。我如何返回描述?下面的SELECT语句是我正在使用的,但它什么也没有返回。SQL Server中的XML查询
SELECT Incidents.IncidentXML.query
('data(/dsIncident/IncidentInformation/Description)') AS Description
FROM Incidents
这是我使用的XML文件的片段:
<dsIncident xmlns="http://tempuri.org/dsIncident.xsd">
<IncidentInformation>
<Description>This is the description.</Description>
<Country>Singapore</Country>
</IncidentInformation>
</dsIncident>