我的存储过程是这样的:
alter procedure insertxml
@inxml xml
as
insert into imagess
(ids, photo, names)
values
(@inxml.value('(/imagess/ids)[1]', 'int'),
@inxml.value('(/imagess/photo)[1]', 'char'),
@inxml.value('(/imagess/names)[1]', 'varchar(10)'))
exec insertxml '<imagess>
<ids>31</ids>
<photo>N</photo>
<names>30</names>
<ids>11</ids>
<photo>O</photo>
<names>20</names>
<ids>12</ids>
<photo>A</photo>
<names>43</names>
</imagess>'
通过这个,我只能插入第一行。我想插入所有 3 行。