4
<book>
<author>Bob Villa</author>
<author>Tom Whatever</author>
<author>Sarah kajdl</author>
</book>
我該如何查詢任何有Tom作者的記錄?我見過的大多數查詢示例都引用了值[x],但我想搜索所有作者。查詢多個XML值
DECLARE @author as varchar(100)
SET @author = 'Tom Whatever'
SELECT xmlfield.value('/book/author')
WHERE xmlfield.value('/book/author') = @author
如果我想在這種情況下查詢標籤「作者」的所有外觀? http://stackoverflow.com/questions/26426412/how-to-ensure-the-sql-is-able-to-read-all-xml-tag-data – SearchForKnowledge 2014-10-17 13:51:21