SELECT *
FROM OPENXML (@index, 'rootnode/group/anothernode')
WITH
(
id int '../id',
anothernode varchar(30) '.'
)
या आप इसके बजाय XML डेटाटाइप का उपयोग इस तरह कर सकते हैं:
SELECT G.N.value('(id/text())[1]', 'int') AS id,
A.N.value('text()[1]', 'varchar(30)') AS anothernode
FROM @XMLDoc.nodes('rootnode/group') AS G(N)
CROSS APPLY G.N.nodes('anothernode') AS A(N)