日期:2014-05-17 浏览次数:20454 次
insert into RecordLabelXML (xmlRecordLabel)
select * from openrowset (
bulk 'D:\数据库作业\sd.txt ',single_blob) as x;
select xmlRecordLabel.query('/root/RecrodLabel/') as result
from RecordLabelXML
select xmlRecordLabel.query('/root/RecrodLabel/') as result
from RecordLabelXML
where xmlRecordLabel.exist('/root/RecrodLabel/recordlabelid/') =5
<root>
<RecrodLabel>
<recordlabelid>0</recordlabelid>
<name>Stanton</name>
<addressid>Lesotho</addressid>
</RecrodLabel>
<RecrodLabel>
<recordlabelid>1</recordlabelid>
<name>Easthampton</name>
<addressid>Sweden</addressid>
</RecrodLabel>
<RecrodLabel>
<recordlabelid>2</recordlabelid>
<name>Mesquite</name>
<addressid>Bahamas</addressid>
</RecrodLabel>
<RecrodLabel>
<recordlabelid>3</recordlabelid>
<name>Niagara Falls</name>
<addressid>Brazil</addressid>
</RecrodLabel>
<RecrodLabel>
<recordlabelid>4</recordlabelid>
<name>Brunswick</name>
<addressid>Djibouti</addressid>
</RecrodLabel>
<RecrodLabel>
<recordlabelid>5</recordlabelid>
<name>Fort Smith</name>
<addressid>Guadeloupe</addressid>
</RecrodLabel>
</root>