读取XML为行记录_[XML教程]
1 declare @x xml
2 set @x='
3 Writing Secure Code
4
5 Michael
6 Howard
7
8
9 David
10 LeBlanc
11
12 39.99
13'
14
15
16
17SELECT nref.value('first-name[1]', 'nvarchar(50)') FirstName,
18 nref.value('last-name[1]', 'nvarchar(50)') LastName
19FROM @x.nodes('//author') AS R(nref)
20
21
结果为