📜  SQL SERVER xquery count 子节点 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:55.590000             🧑  作者: Mango

代码示例1
This will count the number of Colors nodes which is 1.

select @MyXML.value('count(/SampleXML/Colors)', 'int')

This will count the number of rows in Colors which is 5.

select @MyXML.value('count(/SampleXML/Colors/*)', 'int')