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>