【发布时间】:2015-01-29 19:46:04
【问题描述】:
假设我有这个 xml -
<book>
<author>Gambardella, Matthew</author>
<title>XML Developers Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
<book>
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-12-16</publish_date>
<description>A former architect battles corporate zombies,
an evil sorceress, and her own childhood to become queen
of the world.</description>
</book>
<book>
<author>Corets, Eva</author>
<title>Maeve Ascendant</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-11-17</publish_date>
<description>After the collapse of a nanotechnology
society in England, the young survivors lay the
foundation for a new society.</description>
</book>
我需要一个 T-SQL 查询来从该列表中一次选择一本书,因为我需要在将其插入表之前对其进行某种处理。
假设我想选择此列表中的第二个元素并将其显示为表格。
我该怎么做?
【问题讨论】:
标签: sql sql-server xml xquery